/* Modern Login Page Styles - Horizontal Layout */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #ffd700;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 10px 25px rgba(102, 126, 234, 0.4);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --transition: all 0.3s ease;
    --min-touch-target: 44px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--primary-gradient);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* First Section: Login Area */
.login-section {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.login-container {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 450px;
    flex-shrink: 0;
}

.platform-intro {
    flex: 1;
    color: white;
    padding: 2rem;
}

.platform-intro h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.platform-intro h3 i {
    font-size: 2.2rem;
    color: #ffd700;
}

.intro-description {
    font-size: 1.3rem;
    line-height: 1.7;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Container for sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Second Section: Features */
.features-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 4rem 0;
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.section-title {
    color: white;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    color: white;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.feature-card i {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: white;
}

.feature-card p {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 1rem;
}

.feature-card a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
}

.feature-card a:hover {
    color: white;
    text-decoration: underline;
}

/* Third Section: Support */
.support-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    backdrop-filter: blur(5px);
}

.support-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: white;
    max-width: 600px;
    margin: 0 auto;
}

.support-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.support-info>i {
    font-size: 4rem;
    color: #ffd700;
    flex-shrink: 0;
}

.support-content h4 {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.support-content p {
    margin-bottom: 1.2rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

.support-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border: 2px solid #ffd700;
    border-radius: 50px;
    background: rgba(255, 215, 0, 0.1);
}

.support-email:hover {
    color: #2c3e50;
    background: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* Login Form Styles */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 240px;
    max-height: 120px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-container h2 {
    text-align: center;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
}

.login-subtitle {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.4;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
    /* Make labels clickable */
}

.form-group label i {
    margin-right: 10px;
    color: #6c757d;
    width: 16px;
}

.form-group input {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 44px;
    /* Minimum touch target size */
    -webkit-appearance: none;
    /* Remove default iOS styling */
    appearance: none;
    /* Standard property for compatibility */
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
}

/* Improve accessibility for screen readers */
.form-group input:focus,
.form-group input:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Simple checkbox styling */
.checkbox-form input[type="checkbox"] {
    width: auto !important;
    padding: 0 !important;
    margin: 0 8px 0 0 !important;
    vertical-align: middle;
    background: none !important;
    border: none !important;
    min-height: auto !important;
    border-radius: 0 !important;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    box-shadow: none !important;
}

.checkbox-form input[type="checkbox"]:focus {
    box-shadow: none !important;
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

.checkbox-form label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

/* Button Styles */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    /* Minimum touch target size */
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    border-left: 4px solid;
}

.alert-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

/* Field-specific error messages */
.field-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.field-error.show {
    display: block;
}

/* Input field error state */
.form-group input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

/* Loading state for button */
.btn-login.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 50%;
    margin-left: -11px;
    margin-top: -11px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */

/* Large Desktop (1440px+) */
@media (min-width: 1441px) {
    .login-section {
        max-width: 1400px;
        gap: 6rem;
    }

    .platform-intro h3 {
        font-size: 3rem;
    }

    .intro-description {
        font-size: 1.4rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .feature-card {
        padding: 3rem;
    }
}

/* Desktop (1200px - 1440px) */
@media (max-width: 1440px) and (min-width: 1200px) {
    .login-section {
        gap: 5rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .login-section {
        gap: 4rem;
        padding: 3rem 2rem;
    }

    .login-container {
        max-width: 420px;
    }

    .platform-intro h3 {
        font-size: 2.3rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .login-section {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding: 3rem 2rem;
        min-height: auto;
    }

    .login-container {
        max-width: 500px;
        margin: 0 auto;
    }

    .platform-intro {
        max-width: 600px;
        margin: 0 auto;
    }

    .platform-intro h3 {
        font-size: 2.2rem;
        justify-content: center;
    }

    .intro-description {
        font-size: 1.2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }

    .feature-card {
        padding: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Mobile Large (576px - 767px) */
/* Mobile Large (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .login-section {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 1rem;
        min-height: auto;
        justify-content: flex-start;
    }

    .login-container {
        padding: 2rem;
        max-width: 90%;
        margin: 1rem auto 0;
        order: 1;
    }

    .platform-intro {
        order: 2;
        padding: 1rem;
        margin-top: 1rem;
    }

    .platform-intro h3 {
        font-size: 1.8rem;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .intro-description {
        font-size: 1rem;
        line-height: 1.5;
    }

    .features-section {
        padding: 2rem 0;
    }

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

    .feature-card {
        padding: 1.5rem;
        margin: 0 1rem;
        max-width: none;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .support-card {
        max-width: 90%;
        padding: 2rem;
        margin: 0 auto;
    }

    .support-info {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }

    .support-info>i {
        font-size: 2.5rem;
    }
}

/* Mobile Medium (480px - 575px) */
@media (max-width: 575px) and (min-width: 480px) {
    .login-section {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
        min-height: auto;
        justify-content: flex-start;
    }

    .login-container {
        padding: 1.5rem;
        border-radius: var(--border-radius-lg);
        margin: 0.5rem auto 0;
        max-width: 95%;
        order: 1;
    }

    .platform-intro {
        padding: 1rem;
        order: 2;
    }

    .platform-intro h3 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .intro-description {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .features-section {
        padding: 1.5rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .feature-card {
        padding: 1.2rem;
        border-radius: var(--border-radius);
        margin: 0 0.5rem;
    }

    .feature-card i {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .feature-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .feature-card p {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .support-card {
        padding: 1.5rem;
        margin: 0 1rem;
        border-radius: var(--border-radius-lg);
    }

    .support-email {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* Mobile Small (320px - 479px) */
@media (max-width: 479px) {
    .login-section {
        flex-direction: column;
        padding: 0.5rem;
        gap: 1rem;
        min-height: auto;
        justify-content: flex-start;
    }

    .login-container {
        padding: 1.2rem;
        margin: 0.5rem;
        border-radius: var(--border-radius);
        max-width: calc(100% - 1rem);
        order: 1;
    }

    .login-container h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .login-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    .form-group input {
        padding: 0.9rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .btn-login {
        padding: 0.9rem;
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    .platform-intro {
        padding: 0.5rem;
        order: 2;
    }

    .platform-intro h3 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.4rem;
        margin-bottom: 0.8rem;
        justify-content: center;
    }

    .platform-intro h3 i {
        font-size: 1.5rem;
    }

    .intro-description {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .container {
        padding: 0 0.5rem;
    }

    .features-section {
        padding: 1rem 0;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .feature-card {
        padding: 1rem;
        border-radius: 8px;
        margin: 0 0.25rem 1rem;
    }

    .feature-card i {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
    }

    .feature-card h4 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .feature-card p {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .support-section {
        padding: 1rem 0;
    }

    .support-card {
        padding: 1.2rem;
        margin: 0 0.5rem;
        border-radius: var(--border-radius);
    }

    .support-info {
        gap: 1rem;
        flex-direction: column;
    }

    .support-info>i {
        font-size: 2rem;
    }

    .support-content h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .support-content p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }

    .support-email {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        gap: 5px;
    }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
    .login-section {
        padding: 0.5rem 0.2rem;
        gap: 0.5rem;
        min-height: auto;
    }

    .login-container {
        padding: 1rem;
        margin: 0.2rem;
        border-radius: 8px;
        max-width: calc(100% - 0.4rem);
    }

    .login-container h2 {
        font-size: 1.3rem;
    }

    .login-subtitle {
        font-size: 0.75rem;
    }

    .platform-intro h3 {
        font-size: 1.2rem;
    }

    .intro-description {
        font-size: 0.8rem;
    }

    .feature-card {
        padding: 0.8rem;
        margin: 0 0.2rem 0.8rem;
    }

    .support-card {
        padding: 1rem;
        margin: 0 0.2rem;
    }
}

/* Orientation-specific adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .login-section {
        min-height: auto;
        padding: 1rem;
        gap: 2rem;
    }

    .login-container {
        max-width: 400px;
    }

    .platform-intro h3 {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .intro-description {
        font-size: 0.95rem;
    }

    .features-section {
        padding: 1.5rem 0;
    }

    .support-section {
        padding: 1rem 0;
    }
}

/* Galaxy S20 Ultra and similar devices (412 x 915) */
@media screen and (max-width: 412px) and (max-height: 915px) {
    .login-section {
        flex-direction: column;
        padding: 0.5rem;
        gap: 1rem;
        min-height: auto;
        justify-content: flex-start;
    }

    .login-container {
        padding: 1.2rem;
        margin: 0.5rem auto 0;
        max-width: calc(100% - 1rem);
        order: 1;
    }

    .platform-intro {
        order: 2;
        padding: 0.8rem;
    }

    .platform-intro h3 {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.8rem;
    }

    .intro-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .features-section {
        padding: 1rem 0;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .feature-card {
        padding: 1rem;
        margin: 0 0.3rem 1rem;
        border-radius: 8px;
    }

    .feature-card i {
        font-size: 1.8rem;
    }

    .feature-card h4 {
        font-size: 1rem;
    }

    .feature-card p {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .support-card {
        padding: 1.2rem;
        margin: 0 0.5rem;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}