/* Override global styles that prevent scrolling */
html,
body.contact-page {
    overflow: auto !important;
    height: auto !important;
    min-height: 100vh;
}

body.contact-page {
    background-color: #121212;
    color: #E0E0E0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Enable smooth scrolling for better UX */
    scroll-behavior: smooth;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
}

main.contact-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box;
    /* Ensure minimum height for small screens */
    min-height: calc(100vh - 140px);
    /* Account for footer space */
}

/* Mobile optimizations */
@media (max-width: 480px) {
    main.contact-main {
        padding: 15px;
        min-height: calc(100vh - 120px);
        align-items: flex-start;
        padding-top: 30px;
    }

    .contact-box {
        min-height: auto;
        padding: 25px 20px !important;
    }
}

/* Specific iPhone SE optimizations */
@media (max-width: 375px) and (max-height: 667px) {
    main.contact-main {
        padding: 10px;
        min-height: auto;
        align-items: flex-start;
        padding-top: 20px;
    }

    .contact-box {
        padding: 20px 15px !important;
        margin-bottom: 20px;
    }

    .contact-box h2 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }

    .input-group {
        margin-bottom: 15px !important;
    }

    .input-group input,
    .input-group textarea {
        padding: 10px !important;
        font-size: 16px !important;
        /* Prevent zoom on iOS */
    }

    .contact-button {
        padding: 14px !important;
        font-size: 16px !important;
    }
}

.contact-box {
    background-color: #1E1E1E;
    padding: 30px 40px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    color: #f0f0f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
}

.contact-box h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    color: #FFFFFF;
    margin-top: 0;
    margin-bottom: 25px;
}

.contact-box .logo-link {
    text-decoration: none;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-title-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 0.5px;
    margin: 0;
}

.logo-text-main {
    color: #facc15;
}

.logo-text-secondary {
    color: #fff;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: #A0A0A0;
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333333;
    background-color: #2C2C2C;
    color: #E0E0E0;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.3);
}

.contact-button {
    width: 100%;
    padding: 12px;
    background-color: #facc15;
    color: #121212;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.contact-button:hover {
    background-color: #facc15;
    color: #111;
}

.contact-footer {
    padding: 20px;
    font-size: 12px;
    color: #A0A0A0;
    text-align: center;
}

.contact-footer a {
    color: #A0A0A0;
    text-decoration: none;
}

.contact-footer a:hover {
    text-decoration: underline;
}

#form-message {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.success-message {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.error-message {
    background-color: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    border: 1px solid #FF6B6B;
}