#contact {
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(var(--background-color-rgb), 0.85);
    color: var(--text-color);
    text-align: center;
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius);
    animation: fadeIn 0.8s ease-out;
    max-width: var(--content-width);
}

/* Mobile responsiveness for contact */
@media screen and (max-width: 768px) {
    #contact {
        margin: 1rem auto;
        padding: 1.5rem;
        max-width: 95%;
    }
    
    #contact h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        letter-spacing: 1px;
    }
    
    .contact-icons {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .contact-icons a {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    #contact {
        margin: 0.5rem auto;
        padding: 1rem;
        max-width: 98%;
    }
    
    #contact h2 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .contact-icons {
        gap: 0.8rem;
        margin-top: 1rem;
    }
    
    .contact-icons a {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 0.9rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('../images/download.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: gradientFlow 15s ease infinite;
}

#contact h2 {
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    position: relative;
    text-align: center;
    text-shadow: 
        0 0 5px var(--primary-color),
        0 0 10px var(--primary-color),
        0 0 15px var(--primary-color),
        0 0 20px var(--primary-color);
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    0% { 
        text-shadow: 
            0 0 5px var(--primary-color),
            0 0 10px var(--primary-color),
            0 0 15px var(--primary-color),
            0 0 20px var(--primary-color);
    }
    100% { 
        text-shadow: 
            0 0 2px var(--primary-color),
            0 0 5px var(--primary-color),
            0 0 8px var(--primary-color),
            0 0 12px var(--primary-color),
            0 0 18px var(--primary-color),
            0 0 25px var(--primary-color);
    }
}

#contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.4s ease;
}

#contact h2:hover::after {
    width: 120px;
}

#contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--element-spacing);
    background: linear-gradient(135deg, rgba(var(--card-background-rgb), 0.95), rgba(var(--card-background-rgb), 0.85));
    padding: 40px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.5s ease;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

#contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#contact-form:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-5px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

#contact-form label {
    display: block;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    transform: translateY(0);
    transition: all 0.3s ease;
    position: relative;
}

#contact-form label::after {
    content: '*';
    color: #ff6b6b;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#contact-form label.required::after {
    opacity: 1;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 0 0 4px rgba(var(--primary-color-rgb), 0.1),
        0 8px 25px rgba(var(--primary-color-rgb), 0.3);
    transform: translateY(-2px);
}

#contact-form input:focus::placeholder,
#contact-form textarea:focus::placeholder {
    opacity: 0.7;
    transform: translateY(-2px);
}

#contact-form textarea {
    min-height: 160px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

/* Floating label effect */
.form-group.focused label {
    color: var(--primary-color);
    transform: translateY(-2px) scale(0.95);
}

.form-group.focused label::after {
    opacity: 0.8;
}

#contact-form button {
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(var(--primary-color-rgb), 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: 10px;
}

#contact-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.6s;
}

#contact-form button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

#contact-form button:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(var(--primary-color-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#contact-form button:hover::before {
    left: 100%;
}

#contact-form button:hover::after {
    width: 300px;
    height: 300px;
}

#contact-form button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(var(--primary-color-rgb), 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#contact-form button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#contact-form button:disabled::before,
#contact-form button:disabled::after {
    display: none;
}

/* Success animation */
@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: success 0.5s ease;
}