#contact {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.97), rgba(15, 15, 25, 0.98));
    padding: 120px 0;
    overflow: hidden;
    color: #fff;
}

/* Particles background */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#contact-particles {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 0;
}

.section-title {
    position: relative;
    margin-bottom: 60px;
    z-index: 1;
}

.cosmic-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    text-shadow: 0 0 20px rgba(86, 58, 250, 0.5);
}

.cosmic-title .highlight {
    color: transparent;
    background: linear-gradient(90deg, #56a5fa, #d16be5);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
}

.title-line {
    height: 4px;
    width: 80px;
    background: linear-gradient(90deg, #56a5fa, #d16be5);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(86, 58, 250, 0.8);
    margin-bottom: 20px;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Glass card styling */
.glass-card {
    background: rgba(20, 20, 35, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 30px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 2;
    height: 100%;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent
    );
    transform: rotate(45deg);
    transition: all 1.5s ease;
    opacity: 0;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4),
    inset 0 0 1px 1px rgba(255, 255, 255, 0.15);
}

.glass-card:hover::before {
    left: 100%;
    opacity: 1;
}

/* Contact form card */
.contact-form-card {
    padding: 40px;
}

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

.cosmic-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 1rem;
    color: #fff;
    transition: all 0.3s ease;
}

.cosmic-input.error {
    border: 2px solid #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.cosmic-input-group.textarea .cosmic-input {
    min-height: 120px;
    resize: vertical;
}

.cosmic-label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cosmic-input:focus,
.cosmic-input:valid,
.cosmic-input.has-content {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    box-shadow: 0 0 0 2px rgba(86, 165, 250, 0.2);
}

.cosmic-input:focus + .cosmic-label,
.cosmic-input:valid + .cosmic-label,
.cosmic-input.has-content + .cosmic-label {
    top: -10px;
    left: 15px;
    font-size: 0.8rem;
    background: linear-gradient(90deg, #56a5fa, #d16be5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 5px;
}

.cosmic-input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #56a5fa, #d16be5);
    transition: width 0.3s ease;
}

.cosmic-input:focus ~ .cosmic-input-line,
.cosmic-input:valid ~ .cosmic-input-line,
.cosmic-input.has-content ~ .cosmic-input-line {
    width: 100%;
}

/* Error message styling */
.error-message {
    color: #ff4757;
    font-size: 0.8rem;
    margin-top: 5px;
    padding-left: 5px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Cosmic button styling */
.cosmic-button {
    position: relative;
    background: rgba(20, 20, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 30px;
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 150px;
}

.cosmic-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cosmic-button-text {
    position: relative;
    z-index: 1;
}

.cosmic-button-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.cosmic-button-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #56a5fa, #d16be5);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cosmic-button:hover:not(:disabled) .cosmic-button-effect {
    opacity: 1;
}

.cosmic-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.cosmic-button:hover:not(:disabled) .cosmic-button-icon {
    transform: translateX(3px);
}

.cosmic-button:active:not(:disabled) {
    transform: translateY(-1px);
}

/* Loading spinner */
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Contact info card */
.contact-info-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-info-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #ffffff, #a5a5a5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-intro {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1rem;
}

/* Contact details */
.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(86, 165, 250, 0.2), rgba(209, 107, 229, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
}

.contact-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.9);
}

.contact-text p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-text a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: #56a5fa;
}

/* Social links */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: #fff;
    background: linear-gradient(135deg, rgba(86, 165, 250, 0.3), rgba(209, 107, 229, 0.3));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Success Modal */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.message-modal.show {
    opacity: 1;
    visibility: visible;
}

.message-modal-content {
    background: rgba(30, 30, 45, 0.9);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.message-modal.show .message-modal-content {
    transform: scale(1);
}

.message-modal h3 {
    font-size: 1.8rem;
    margin: 15px 0;
    background: linear-gradient(90deg, #ffffff, #a5a5a5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.message-modal p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

/* Error icon styling */
.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    color: #ff4757;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4CAF50;
}

.check-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    animation: pulse-green 1.5s infinite;
}

.icon-line {
    height: 5px;
    background-color: #4CAF50;
    display: block;
    border-radius: 10px;
    position: absolute;
    z-index: 10;
}

.icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.8s;
}

.icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.8s;
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 46px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 46px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 46px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 46px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

@keyframes pulse-green {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .contact-info-card {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .cosmic-title {
        font-size: 2.2rem;
    }

    .contact-form-card, .contact-info-card {
        padding: 30px;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .contact-form-card, .contact-info-card {
        padding: 20px;
    }

    .cosmic-input {
        padding: 12px 15px;
    }

    .cosmic-label {
        font-size: 0.9rem;
        top: 12px;
        left: 15px;
    }
}