/**
 * SunixGo - Giriş Sayfası Stilleri
 * Modern ve Animasyonlu Tasarım
 */

:root {
    --primary: #103595;
    --primary-dark: #0a2460;
    --primary-light: #1e4fc2;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-color: #f0f4f8;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Circles */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: floatBubble 20s ease-in-out infinite;
}

body::before {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

body::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
    animation-delay: -10s;
}

@keyframes floatBubble {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, 30px) scale(1.05);
    }
    50% {
        transform: translate(-10px, 50px) scale(0.95);
    }
    75% {
        transform: translate(30px, 20px) scale(1.02);
    }
}

.giris-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

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

/* Logo Area */
.logo-area {
    text-align: center;
    color: #fff;
    animation: logoIn 1s ease-out;
}

@keyframes logoIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logo {
    width: 90px;
    height: auto;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(0) invert(1) drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
    50% {
        transform: scale(1.03);
        filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    }
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #fff, #e0e7ff, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.logo-alt {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Giriş Formu */
.giris-form {
    width: 100%;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    animation: formIn 0.8s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

.giris-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
}

@keyframes formIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* Telefon Input */
.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
}

.input-prefix {
    padding: 15px;
    background: var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
}

.form-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-color);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* PIN Inputs */
.pin-container {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pin-input {
    width: 62px;
    height: 68px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.pin-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(16, 53, 149, 0.15);
    transform: scale(1.05);
}

.pin-input.filled {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-color: var(--primary);
    animation: pinFill 0.3s ease-out;
}

@keyframes pinFill {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Error Message */
.error-message {
    display: none;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    animation: shakeError 0.5s ease-out;
}

.error-message.show {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* Giriş Butonu */
.btn-giris {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-giris::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;
}

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

.btn-giris:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 53, 149, 0.5);
}

.btn-giris:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(16, 53, 149, 0.4);
}

.btn-giris:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-giris:disabled::before {
    display: none;
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.footer-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.footer-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* PWA Install Hint */
.pwa-hint {
    margin-top: 20px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    animation: pulseHint 2s ease-in-out infinite;
}

@keyframes pulseHint {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.pwa-hint svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .giris-container {
        gap: 20px;
    }

    .logo {
        width: 60px;
    }

    .logo-text {
        font-size: 1.6rem;
    }

    .giris-form {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .pin-input {
        width: 55px;
        height: 60px;
        font-size: 1.5rem;
    }

    .pin-container {
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .pin-input {
        width: 50px;
        height: 55px;
        font-size: 1.3rem;
    }

    .pin-container {
        gap: 8px;
    }
}
