/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #362B7D 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Subtle animated background elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    margin-bottom: 60px;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 24px 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 36px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.3));
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 100px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: white;
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 60px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* URL Form */
.url-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.15),
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.url-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.url-input {
    flex: 1;
    padding: 20px 24px;
    border: 2px solid rgba(229, 231, 235, 0.6);
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.url-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.url-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.shorten-btn {
    padding: 20px 36px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.shorten-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.shorten-btn:hover::before {
    left: 100%;
}

.shorten-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.shorten-btn:active {
    transform: translateY(-1px);
}

.custom-url-group {
    margin-top: 16px;
}

.custom-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.custom-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

/* Result Section */
.result-section {
    margin-top: 40px;
}

.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.15),
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-header h3 {
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.copy-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.result-url {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 18px;
    color: #667eea;
    font-weight: 600;
    word-break: break-all;
    margin-bottom: 12px;
}

.result-stats {
    font-size: 14px;
    color: #6b7280;
}

.stat {
    display: block;
    margin-bottom: 4px;
}

/* Features Preview */
.features-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.feature-card h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Features Section */
.features {
    background: white;
    padding: 80px 0;
    margin-top: 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: #6b7280;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 32px 24px;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.feature-icon-large {
    font-size: 48px;
    margin-bottom: 24px;
}

.feature-item h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.feature-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px);
    border-radius: 32px 32px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    padding: 40px 0 24px;
    margin-top: 120px;
    position: relative;
    box-shadow: 
        0 -12px 40px rgba(0, 0, 0, 0.15),
        0 -4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.footer-section {
    flex: 1;
    min-width: 220px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.3px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 400;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 0;
    position: relative;
    margin-bottom: 6px;
    border-radius: 8px;
}

.footer-section a:hover {
    color: white;
    transform: translateX(6px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 12px;
}

.footer-section a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.footer-section a:hover::before {
    opacity: 1;
    left: -16px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 400;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px 24px;
    }

    .nav {
        gap: 24px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .form-group {
        flex-direction: column;
    }

    .shorten-btn {
        width: 100%;
    }

    .footer {
        margin-top: 80px;
        border-radius: 24px 24px 0 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .footer-section {
        min-width: auto;
    }

    .footer-section a {
        display: inline-block;
        margin-right: 20px;
        margin-bottom: 8px;
    }

    .features-preview {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header {
        padding: 16px 20px;
    }

    .hero {
        padding: 40px 0 60px;
    }

    .hero-title {
        font-size: 32px;
    }

    .url-form {
        padding: 24px;
    }

    .footer {
        padding: 32px 0 20px;
        margin-top: 60px;
        border-radius: 20px 20px 0 0;
    }

    .footer-section a {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
        text-align: center;
    }

    .features {
        padding: 60px 0;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
.success {
    animation: success 0.6s ease-in-out;
}

@keyframes success {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Modern 2025 Effects */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.5); }
}

/* Subtle animations for interactive elements */
.url-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 70px rgba(0,0,0,0.2),
        0 12px 40px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 70px rgba(0,0,0,0.2),
        0 12px 40px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Enhanced focus states */
.url-input:focus,
.custom-input:focus {
    transform: translateY(-1px);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 8px 24px rgba(102, 126, 234, 0.15);
}

/* Subtle background animation */
@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background-size: 200% 200%;
    animation: backgroundShift 20s ease infinite;
}
