/* ============================================================
   AUTH.CSS — Тогуз Коргоол | Страница авторизации
   ============================================================ */

:root {
    --primary:     #3498db;
    --primary-dark:#2980b9;
    --success:     #2ecc71;
    --danger:      #e74c3c;
    --card-bg:     rgba(30, 40, 55, 0.92);
    --border:      rgba(255,255,255,0.1);
    --text:        #ecf0f1;
    --text-muted:  rgba(255,255,255,0.55);
    --input-bg:    rgba(255,255,255,0.07);
}

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

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

html, body { height: 100%; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text);
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

.game-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 50%, #3498db 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShine 4s linear infinite;
}

@keyframes titleShine {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(52,152,219,0.3);
}

.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

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

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.form-control::placeholder { color: rgba(255,255,255,0.25); }

.btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover       { transform: translateY(-2px); filter: brightness(1.1); }
.btn:active      { transform: translateY(0); }
.btn:disabled    { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(52,152,219,0.3);
    margin-bottom: 16px;
}

.btn-google {
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 10px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.message {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: none;
}

.message.error   { background: rgba(231,76,60,0.15);  border: 1px solid rgba(231,76,60,0.3);  color: #ff6b6b; }
.message.success { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.3); color: #2ecc71; }
.message.show    { display: block; }

.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.code-input {
    width: 48px;
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

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

.code-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 8px auto 20px;
    text-decoration: underline;
}

.resend-btn:disabled { color: var(--text-muted); text-decoration: none; cursor: not-allowed; }

.forgot-link {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 16px;
}

.forgot-link a {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.forgot-link a:hover { text-decoration: underline; }

.back-link { text-align: center; margin-top: 16px; }

.back-link a {
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.back-link a:hover { color: var(--text); }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

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

.google-icon { width: 20px; height: 20px; }

.tg-widget-wrap {
    display: flex;
    justify-content: center;
    margin-top: 4px;
    min-height: 0;
    overflow: hidden;
}

.tg-widget-wrap iframe { border-radius: 12px; }

footer {
    text-align: center;
    padding: 20px 20px 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    width: 100%;
    margin-top: 16px;
}