/* ===============================================
   VERSION 1: REFINED & POLISHED
   Mevcut tasarımın geliştirilmiş versiyonu
   =============================================== */

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

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ===============================================
   LOGIN CARD - Enhanced
   =============================================== */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.15),
        0 10px 35px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 40px 35px;
    position: relative;
    width: 100%;
    max-width: 460px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.18),
        0 15px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ===============================================
   TOP BUTTONS - Improved
   =============================================== */
.top-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
    gap: 15px;
}

.help-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border: none;
    border-radius: 28px;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    letter-spacing: 0.3px;
}

.help-btn:hover {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

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

/* Language Selector - Enhanced */
.lang-selector {
    display: flex;
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 5px;
    border: 1px solid rgba(233, 236, 239, 0.8);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.lang-option {
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: 44px;
    text-align: center;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.lang-option.active {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
    transform: scale(1.02);
}

.lang-option:not(.active):hover {
    background: rgba(233, 236, 239, 0.8);
    color: #495057;
    transform: translateY(-1px);
}

/* ===============================================
   CONTENT SECTION - Refined
   =============================================== */
.content-section {
    text-align: center;
    margin-bottom: 10px;
}

.logo-row {
    margin-bottom: 10px;
}

.logo-row img {
    max-width: 100%;
    max-height: 75px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo-row img:hover {
    transform: scale(1.02);
}

.title-row {
    margin-bottom: 5px;
}

.title-row h1 {
    color: #1f2937;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    word-wrap: break-word;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.title-row h1:hover {
    color: #059669;
}

.subtitle-row p {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ===============================================
   FORM SECTION - Enhanced
   =============================================== */
.form-section {
    width: 100%;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.form-group input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

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

.form-group input:focus {
    border-color: #059669;
    outline: none;
    box-shadow: 
        0 0 0 4px rgba(5, 150, 105, 0.1),
        0 4px 6px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    transform: translateY(-1px);
}

.form-group input:hover:not(:focus) {
    border-color: #d1d5db;
}

/* ===============================================
   BUTTONS - Refined
   =============================================== */
.login-button {
    width: 100%;
    padding: 17px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(5, 150, 105, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
}

.login-button::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;
}

.login-button:hover {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(5, 150, 105, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-button:hover::before {
    left: 100%;
}

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

/* ===============================================
   OAUTH SECTION - Enhanced
   =============================================== */
.login-divider {
    display: flex;
    align-items: center;
    margin: 10px 0;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

.login-divider span {
    padding: 0 18px;
    text-transform: uppercase;
}

/* OAuth Button - Premium Style */
.oauth-button-premium {
    width: 100%;
    padding: 5px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.oauth-button-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.oauth-button-premium:hover {
    border-color: #059669;
    box-shadow: 
        0 4px 20px rgba(5, 150, 105, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    text-decoration: none;
}

.oauth-button-premium:hover::before {
    opacity: 1;
}

.oauth-button-premium-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 1;
}

.oauth-button-premium-icon {
    font-size: 42px;
    color: #059669;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 1;
}

.oauth-button-premium-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    position: relative;
    z-index: 1;
}

.oauth-button-premium-label {
    font-size: 13px;
    font-weight: 600;
    color: #e6e6e6;
    letter-spacing: 0.3px;
}

.oauth-button-premium-provider {
    font-size: 19px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.3px;
}

/* ===============================================
   ALERTS - Modern Style
   =============================================== */
.alert {
    border-radius: 14px;
    margin-bottom: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: alertSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.bg-light-warning {
    border-radius: 14px !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.15);
}

.alert.bg-light-danger {
    border-radius: 14px !important;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.15);
}

.alert.bg-light-success {
    border-radius: 14px !important;
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.15);
}

/* ===============================================
   RESPONSIVE - Optimized
   =============================================== */

/* Large Screens */
@media (min-width: 1200px) {
    .login-card {
        padding: 50px 45px;
        max-width: 520px;
    }

    .title-row h1 {
        font-size: 32px;
    }

    .subtitle-row p {
        font-size: 17px;
    }

    .form-group input {
        padding: 17px 20px;
        font-size: 16px;
    }

    .login-button {
        padding: 19px;
        font-size: 17px;
    }
}

/* Tablet */
@media (max-width: 768px) and (min-width: 481px) {
    .main-container {
        padding: 30px 25px;
    }

    .login-card {
        padding: 35px 30px;
        max-width: 550px;
        border-radius: 24px;
    }

    .title-row h1 {
        font-size: 26px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .main-container {
        padding: 15px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .top-buttons {
        margin-bottom: 10px;
        gap: 12px;
    }

    .help-btn {
        padding: 9px 16px;
        font-size: 12px;
    }

    .lang-option {
        padding: 7px 12px;
        font-size: 11px;
        min-width: 38px;
    }

    .title-row h1 {
        font-size: 22px;
    }

    .subtitle-row p {
        font-size: 14px;
    }

    .form-group input {
        padding: 13px 16px;
        font-size: 14px;
    }

    .login-button {
        padding: 15px;
        font-size: 15px;
    }

    .oauth-button-premium {
        padding: 18px;
    }

    .oauth-button-premium-logo,
    .oauth-button-premium-icon {
        width: 36px;
        height: 36px;
        font-size: 36px;
    }

    .oauth-button-premium-provider {
        font-size: 17px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .top-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .help-btn {
        width: 100%;
        justify-content: center;
    }

    .title-row h1 {
        font-size: 19px;
    }
}

/* Landscape */
@media (orientation: landscape) and (max-height: 600px) {
    .main-container {
        padding: 15px 20px;
        align-items: flex-start;
    }

    .login-card {
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 25px 30px;
    }

    .content-section {
        margin-bottom: 20px;
    }

    .logo-row {
        margin-bottom: 12px;
    }

    .logo-row img {
        max-height: 45px;
    }
}

/* ===============================================
   ACCESSIBILITY & PREFERENCES
   =============================================== */

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    html, body {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
    }

    .login-card {
        background: rgba(30, 41, 59, 0.98);
        border-color: rgba(71, 85, 105, 0.3);
        box-shadow: 
            0 25px 70px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .title-row h1 {
        color: #f8fafc;
    }

    .subtitle-row p {
        color: #cbd5e1;
    }

    .form-group label {
        color: #e2e8f0;
    }

    .form-group input {
        background: rgba(51, 65, 85, 0.5);
        border-color: #475569;
        color: #f8fafc;
    }

    .form-group input:focus {
        background: rgba(51, 65, 85, 0.8);
        border-color: #10b981;
    }

    .lang-selector {
        background: rgba(51, 65, 85, 0.6);
        border-color: rgba(71, 85, 105, 0.5);
    }

    .lang-option {
        color: #cbd5e1;
    }

    .oauth-button-premium {
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.6) 100%);
        border-color: #475569;
    }

    .oauth-button-premium-provider {
        color: #f8fafc;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .login-card:hover,
    .help-btn:hover,
    .login-button:hover,
    .oauth-button-premium:hover {
        transform: none;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .login-card {
        border: 3px solid #000;
        background: white;
        box-shadow: none;
    }

    .form-group input {
        border: 3px solid #000;
    }

    .login-button,
    .help-btn {
        background: #000;
        border: 3px solid #000;
    }
}
