:root {
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-300: #fdba74;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-800: #9a3412;
    --orange-900: #7c2d12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    overflow-x: hidden;
}

.login-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 100vh;
}

/* ===== SHOWCASE SIDE ===== */
.showcase-side {
    position: relative;
    background: linear-gradient(160deg, var(--orange-400) 0%, var(--orange-500) 25%, var(--orange-600) 50%, var(--orange-700) 75%, #9a3412 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    overflow: hidden;
}

/* Animated background shapes */
.showcase-side::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 100%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
}

.showcase-side::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

/* Decorative circles */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.deco-circle-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    right: -150px;
    animation: spin 40s linear infinite;
}

.deco-circle-2 {
    width: 350px;
    height: 350px;
    bottom: 5%;
    left: -100px;
    border-style: dashed;
    animation: spin 30s linear infinite reverse;
}

.deco-circle-3 {
    width: 180px;
    height: 180px;
    top: 25%;
    right: 15%;
    background: rgba(255, 255, 255, 0.06);
    animation: bounce 5s ease-in-out infinite;
}

.deco-circle-4 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    right: 8%;
    background: rgba(255, 255, 255, 0.04);
    animation: bounce 4s ease-in-out infinite 1s;
}

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

@keyframes bounce {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-20px); }
}

/* Floating icons - meaningful for inclusive education */
.floating-icon {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.25;
    animation: floatIcon 6s ease-in-out infinite;
    filter: grayscale(0.2);
}

.floating-icon:nth-child(1) { top: 12%; left: 8%; animation-delay: 0s; font-size: 3rem; }
.floating-icon:nth-child(2) { top: 55%; right: 12%; animation-delay: 1.5s; }
.floating-icon:nth-child(3) { bottom: 18%; left: 20%; animation-delay: 0.8s; }
.floating-icon:nth-child(4) { top: 35%; left: 55%; animation-delay: 2s; font-size: 2rem; }
.floating-icon:nth-child(5) { bottom: 35%; right: 25%; animation-delay: 0.5s; font-size: 2rem; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-18px) rotate(3deg); }
}

.showcase-content {
    position: relative;
    z-index: 10;
    color: white;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.logo-img {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.logo-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.showcase-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.showcase-title span {
    display: block;
    font-weight: 400;
    font-size: 2.2rem;
    opacity: 0.92;
    margin-top: 0.4rem;
}

.showcase-description {
    font-size: 1.15rem;
    line-height: 1.75;
    opacity: 0.92;
    max-width: 520px;
    margin-bottom: 2.5rem;
}

/* Feature tags - skills */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.feature-tag .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: dotPulse 2s ease-in-out infinite;
}

.feature-tag .icon {
    font-size: 1rem;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Stats section */
.stats-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    gap: 2.5rem;
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ===== FORM SIDE ===== */
.form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: #0f0f1a;
    position: relative;
}

/* Mobile header */
.mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
}

/* Mobile tags */
.mobile-tags {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.mobile-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-tag .icon {
    font-size: 0.8rem;
}

.mobile-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
}

.mobile-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.mobile-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.mobile-description {
    display: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
}

.form-container {
    width: 100%;
    max-width: 400px;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: var(--orange-500);
    color: white;
    border-color: var(--orange-500);
}

.lang-btn:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

.lang-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Form card */
.form-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
}

.form-header {
    margin-bottom: 2rem;
}

.form-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.form-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Form fields */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--orange-500);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.form-input.is-invalid {
    border-color: #ef4444;
}

.error-message {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-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;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.4);
}

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

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

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-heart {
    color: var(--orange-400);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Animations on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }
.delay-6 { animation-delay: 0.6s; opacity: 0; }


/* ============================================
   RESPONSIVE DESIGN - TABLET & MOBILE
   ============================================ */

/* Large Tablet (1024px - 1200px) */
@media (max-width: 1200px) {
    .showcase-side {
        padding: 3rem;
    }

    .showcase-title {
        font-size: 2.8rem;
    }

    .showcase-title span {
        font-size: 1.9rem;
    }

    .showcase-description {
        font-size: 1.05rem;
    }

    .logo-badge {
        display: none;
    }

    .deco-circle-1 {
        width: 400px;
        height: 400px;
    }

    .deco-circle-2 {
        width: 280px;
        height: 280px;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .showcase-side {
        display: none;
    }

    .form-side {
        background: linear-gradient(180deg, var(--orange-500) 0%, var(--orange-600) 20%, #0f0f1a 45%);
        padding: 3rem 2rem;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 4rem;
    }

    .mobile-header {
        display: block;
        animation: fadeInUp 0.6s ease forwards;
    }

    .mobile-description {
        display: block;
    }

    .mobile-tags {
        display: flex;
    }

    .mobile-logo {
        width: 90px;
        height: 90px;
        border-radius: 24px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }

    .mobile-title {
        font-size: 1.75rem;
    }

    .form-container {
        max-width: 440px;
    }

    .form-card {
        padding: 2rem;
        border-radius: 20px;
    }

    .lang-switcher {
        justify-content: center;
        margin-bottom: 1.5rem;
    }
}

/* Small Tablet (600px - 768px) */
@media (max-width: 768px) {
    .form-side {
        padding: 2.5rem 1.5rem;
        padding-top: 3rem;
    }

    .mobile-header {
        margin-bottom: 1.5rem;
    }

    .mobile-logo {
        width: 75px;
        height: 75px;
    }

    .mobile-title {
        font-size: 1.5rem;
    }

    .mobile-subtitle {
        font-size: 0.85rem;
    }

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

    .mobile-tags {
        gap: 0.4rem;
        margin-top: 1.25rem;
    }

    .mobile-tag {
        padding: 0.35rem 0.65rem;
        font-size: 0.65rem;
    }

    .form-card {
        padding: 1.75rem;
        border-radius: 18px;
    }

    .form-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .form-title {
        font-size: 1.4rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .form-input {
        padding: 0.9rem 0.9rem 0.9rem 2.5rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    .footer-text {
        font-size: 0.8rem;
    }
}

/* Mobile (до 600px) */
@media (max-width: 600px) {
    .form-side {
        padding: 2rem 1.25rem;
        padding-top: 2.5rem;
        background: linear-gradient(180deg, var(--orange-500) 0%, var(--orange-600) 25%, #0f0f1a 50%);
    }

    .mobile-header {
        margin-bottom: 1.25rem;
    }

    .mobile-logo {
        width: 65px;
        height: 65px;
        border-radius: 18px;
        padding: 10px;
    }

    .mobile-title {
        font-size: 1.35rem;
    }

    .mobile-subtitle {
        font-size: 0.8rem;
        padding: 0 0.5rem;
    }

    .mobile-description {
        font-size: 0.75rem;
        padding: 0 1rem;
    }

    .mobile-tags {
        gap: 0.35rem;
        margin-top: 1rem;
    }

    .mobile-tag {
        padding: 0.3rem 0.55rem;
        font-size: 0.6rem;
    }

    .mobile-tag .icon {
        font-size: 0.7rem;
    }

    .form-container {
        max-width: 100%;
    }

    .lang-switcher {
        margin-bottom: 1.25rem;
    }

    .lang-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.75rem;
    }

    .form-card {
        padding: 1.5rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.04);
    }

    .form-header {
        margin-bottom: 1.5rem;
    }

    .form-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-subtitle {
        font-size: 0.8rem;
        line-height: 1.5;
    }

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

    .form-label {
        font-size: 0.8rem;
    }

    .form-input {
        padding: 0.85rem 0.85rem 0.85rem 2.4rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 10px;
    }

    .input-icon {
        font-size: 1rem;
        left: 0.85rem;
    }

    .submit-btn {
        padding: 0.85rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .submit-btn svg {
        width: 18px;
        height: 18px;
    }

    .form-footer {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }

    .footer-text {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .alert {
        padding: 0.85rem 1rem;
        font-size: 0.8rem;
        border-radius: 10px;
    }

    .alert svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .error-message {
        font-size: 0.75rem;
    }
}

/* Extra Small Mobile (до 380px) */
@media (max-width: 380px) {
    .form-side {
        padding: 1.5rem 1rem;
        padding-top: 2rem;
    }

    .mobile-logo {
        width: 55px;
        height: 55px;
    }

    .mobile-title {
        font-size: 1.2rem;
    }

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

    .mobile-tags {
        display: none; /* Hide on very small screens */
    }

    .lang-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
    }

    .form-card {
        padding: 1.25rem;
    }

    .form-title {
        font-size: 1.1rem;
    }

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

    .form-input {
        padding: 0.8rem 0.8rem 0.8rem 2.2rem;
    }

    .submit-btn {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .form-side {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .mobile-header {
        margin-bottom: 1rem;
    }

    .mobile-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }

    .mobile-title {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }

    .mobile-subtitle,
    .mobile-description {
        display: none;
    }

    .mobile-tags {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .form-card {
        padding: 1.25rem;
    }

    .form-header {
        margin-bottom: 1rem;
    }

    .form-icon {
        display: none;
    }

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

    .form-footer {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
}

/* Safe area for notched devices (iPhone X, etc.) */
@supports (padding: max(0px)) {
    .form-side {
        padding-left: max(1.25rem, env(safe-area-inset-left));
        padding-right: max(1.25rem, env(safe-area-inset-right));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}

/* High contrast mode / Accessibility */
@media (prefers-contrast: high) {
    .form-card {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .form-input {
        border: 2px solid rgba(255, 255, 255, 0.4);
    }

    .form-input:focus {
        border-color: var(--orange-400);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-icon,
    .deco-circle,
    .footer-heart {
        animation: none;
    }
}
