/* ═══════════════════════════════════════════════
   YaBaV — Main Stylesheet
   Tüm sayfalar için ortak CSS
   ═══════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --bg: #0a0a12;
    --surface: #12131a;
    --surface2: #181926;
    --border: #24283b;
    --text: #e7ecff;
    --muted: #9fb1c7;
    --accent: #dc143c;
    --accent2: #ff2d55;
    --ok: #00e676;
    --warn: #ff9800;
    --info: #5bb8ff;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.2);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.3);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.4);
    --shadow-accent: 0 8px 25px rgba(220,20,60,0.3);
    --shadow-accent-lg: 0 12px 35px rgba(220,20,60,0.5);
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent2));
    --gradient-accent-top: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* ── Light Theme ── */
[data-theme="light"] {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface2: #f0f2f5;
    --border: #e2e8f0;
    --text: #1a202c;
    --muted: #4a5568;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
    --shadow-accent: 0 8px 25px rgba(220,20,60,0.15);
    --shadow-accent-lg: 0 12px 35px rgba(220,20,60,0.25);
}
[data-theme="light"] body {
    background: linear-gradient(180deg, #f5f7fa, #e8eaf6);
}
[data-theme="light"] .bg-glow::before {
    background: radial-gradient(ellipse at 30% 30%, rgba(220,20,60,0.04) 0%, transparent 60%);
}
[data-theme="light"] ::-webkit-scrollbar-track { background: #f5f7fa; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c4c9d4; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #a0a8b8; }

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: var(--accent2);
}

img { max-width: 100%; height: auto; }

/* ── Container ── */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Radial Glow Background ── */
.bg-glow::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -10%;
    width: 120%;
    height: 160%;
    background: radial-gradient(ellipse at 30% 30%, rgba(220,20,60,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    text-align: center;
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 50px;
}
.section-title span {
    color: var(--accent);
}

/* ── Logo ── */
.logo {
    text-align: center;
    font-size: 2em;
    font-weight: 900;
    margin-bottom: 8px;
}
.logo span { color: var(--accent); }

.subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 0.9em;
    margin-bottom: 30px;
}

/* ── Buttons ── */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    line-height: 1;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent-lg);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.btn-block {
    width: 100%;
    padding: 14px;
}

.btn:disabled, .btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent-top);
}

.card-sm {
    max-width: 420px;
    width: 100%;
}

.card-md {
    max-width: 450px;
    width: 100%;
}

/* ── Auth Layout (login, register, forgot, reset) ── */
.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* ── Form Elements ── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.form-group small {
    color: var(--muted);
    font-size: 0.8em;
    display: block;
    margin-top: 4px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1em;
    font-family: var(--font);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(220,20,60,0.15);
}

.form-input::placeholder {
    color: #555;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239fb1c7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* ── Input Wrap (password toggle) ── */
.input-wrap {
    position: relative;
}

.input-wrap .form-input {
    padding-right: 44px;
}

.eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1em;
    user-select: none;
    line-height: 1;
}

/* ── Password Strength Bar ── */
.strength-bar {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
    transition: all 0.3s;
    background: var(--border);
}
.strength-bar.weak { background: var(--accent); width: 33%; }
.strength-bar.medium { background: #ff9800; width: 66%; }
.strength-bar.strong { background: #00e676; width: 100%; }

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9em;
    line-height: 1.5;
}
.alert a { font-weight: 600; }

.alert-error {
    background: rgba(220,20,60,0.1);
    border: 1px solid rgba(220,20,60,0.3);
    color: var(--accent);
}

.alert-success {
    background: rgba(0,230,118,0.1);
    border: 1px solid rgba(0,230,118,0.3);
    color: var(--ok);
}

.alert-info {
    background: rgba(0,136,204,0.1);
    border: 1px solid rgba(0,136,204,0.3);
    color: var(--info);
}

.alert-warning {
    background: rgba(255,152,0,0.1);
    border: 1px solid rgba(255,152,0,0.3);
    color: var(--warn);
}

/* ── Links Block ── */
.links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85em;
}
.links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.links a:hover {
    text-decoration: underline;
}
.links p + p {
    margin-top: 8px;
}

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 40px);
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toastIn 0.35s cubic-bezier(0.21,1.02,0.73,1) forwards;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.toast.toast-success::before { background: var(--ok); }
.toast.toast-error::before { background: var(--accent); }
.toast.toast-warning::before { background: var(--warn); }
.toast.toast-info::before { background: var(--info); }

.toast-icon {
    font-size: 1.3em;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.85em;
    color: var(--muted);
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1em;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.2s;
}
.toast-close:hover {
    color: var(--text);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 0 0 0 var(--radius);
    animation: toastProgress linear forwards;
}

.toast.removing {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(80px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(80px) scale(0.9);
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ── Confirm Modal ── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.25s cubic-bezier(0.21,1.02,0.73,1);
}

.modal-box h3 {
    font-size: 1.15em;
    margin-bottom: 12px;
}

.modal-box p {
    color: var(--muted);
    font-size: 0.93em;
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-actions .btn {
    padding: 10px 24px;
    font-size: 0.9em;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeUp 0.6s ease-out forwards; opacity: 0; }
.animate.d1 { animation-delay: 0.1s; }
.animate.d2 { animation-delay: 0.2s; }
.animate.d3 { animation-delay: 0.3s; }
.animate.d4 { animation-delay: 0.4s; }

/* ── Top Bar (blog, page) ── */
.top-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1240px;
}

.top-bar .logo {
    font-size: 1.3em;
    margin-bottom: 0;
    text-align: left;
}

.top-bar-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.top-bar-nav a {
    color: var(--muted);
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s;
}
.top-bar-nav a:hover {
    color: var(--accent);
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--muted);
    font-size: 0.85em;
    border-top: 1px solid var(--border);
}

.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--muted);
    margin: 0 10px;
    font-size: 0.9em;
}
.footer-links a:hover {
    color: var(--accent);
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-ok { color: var(--ok); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .card { padding: 28px 20px; }
    .logo { font-size: 1.6em; }
    .section-title { font-size: 1.5em; }
    .btn { padding: 12px 24px; font-size: 0.95em; }
    .toast-container { max-width: 100%; right: 10px; top: 10px; width: calc(100% - 20px); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3f5c; }

/* ── Theme Toggle Button ── */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    line-height: 1;
}
.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}
