﻿/* =========================================
   1. TEMEL DEĞİŞKENLER (LIGHT MODE)
   ========================================= */
:root {
    --bg-gradient-start: #f3f4f6;
    --bg-gradient-end: #e5e7eb;
    --container-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-color: #4f46e5; /* İndigo moru - Ana Renk */
    --accent-hover: #4338ca;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --result-bg: #f9fafb;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =========================================
   2. DARK MODE DEĞİŞKENLERİ
   ========================================= */
[data-theme="dark"] {
    --bg-gradient-start: #111827;
    --bg-gradient-end: #0f172a;
    --container-bg: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-color: #6366f1;
    --accent-hover: #818cf8;
    --border-color: #374151;
    --card-bg: #374151;
    --result-bg: #111827;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* =========================================
   3. GENEL AYARLAR & RESET
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Dashboard için üstten başlar */
}

/* Özel Scrollbar Tasarımı */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 4px;
    opacity: 0.5;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: var(--container-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

/* =========================================
   4. HEADER & THEME SWITCH
   ========================================= */
header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Dark Mode Toggle Switch */
.theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

    .theme-switch input {
        display: none;
    }

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
}

    .slider:before {
        background-color: white;
        bottom: 4px;
        content: "";
        height: 26px;
        left: 4px;
        position: absolute;
        transition: .4s;
        width: 26px;
        border-radius: 50%;
        z-index: 2;
    }

input:checked + .slider {
    background-color: var(--accent-color);
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.sun-icon {
    color: #f39c12;
    font-size: 14px;
    margin-left: 5px;
}

.moon-icon {
    color: #f1c40f;
    font-size: 14px;
    margin-right: 5px;
}

/* =========================================
   5. TABS (MENÜ)
   ========================================= */
.tabs {
    display: flex;
    background: var(--result-bg);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
}

    .tabs::-webkit-scrollbar {
        display: none;
    }

.tab-button {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

    .tab-button:hover {
        color: var(--text-primary);
        background: rgba(0,0,0,0.02);
    }

    .tab-button.active {
        color: var(--accent-color);
        border-bottom-color: var(--accent-color);
        background: var(--container-bg);
    }

/* =========================================
   6. İÇERİK ALANI
   ========================================= */
.content {
    padding: 30px;
    min-height: 400px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

    .tab-content.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* =========================================
   7. KARTLAR (CARDS)
   ========================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    position: relative;
    padding-bottom: 50px;
}

.clickable-card {
    cursor: pointer;
}

    .clickable-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
        border-color: var(--accent-color);
    }

.card h3 {
    margin: 15px 0 10px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card .icon {
    font-size: 2em;
}

.card-action {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.8;
    transition: all 0.3s;
}

.clickable-card:hover .card-action {
    opacity: 1;
    transform: translateX(-5px);
}

/* =========================================
   8. FORMLAR & BUTONLAR
   ========================================= */
.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
    }

input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
}

    input:focus {
        outline: none;
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    }

.btn {
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.3s;
}

    .btn:hover {
        background: var(--accent-hover);
        transform: translateY(-2px);
    }

    .btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

.btn-secondary {
    background: var(--text-secondary);
    margin-top: 10px;
}

/* =========================================
   9. ROI & GRAFİK ALANI
   ========================================= */
.roi-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .roi-layout {
        grid-template-columns: 1fr;
    }
}

.result-box {
    background: var(--result-bg);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid var(--accent-color);
    display: none;
}

    .result-box.show {
        display: block;
        animation: fadeIn 0.5s;
    }

    .result-box h3 {
        margin-bottom: 15px;
        color: var(--text-primary);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
    }

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.metric-item {
    text-align: center;
}

    .metric-item .lbl {
        display: block;
        font-size: 0.8rem;
        color: var(--text-secondary);
        margin-bottom: 5px;
    }

    .metric-item .val {
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--text-primary);
    }

/* =========================================
   10. SEO ANALİZ SONUÇLARI
   ========================================= */
.seo-header-flex {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--border-color) 0%, var(--border-color) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

    .score-circle::before {
        content: '';
        position: absolute;
        width: 100px;
        height: 100px;
        background: var(--result-bg);
        border-radius: 50%;
    }

.score-num {
    position: relative;
    font-size: 2rem;
    font-weight: 800;
    z-index: 2;
    color: var(--text-primary);
}

.score-label {
    position: relative;
    font-size: 0.7rem;
    color: var(--text-secondary);
    z-index: 2;
}

.score-details {
    flex: 1;
}

.audit-list ul {
    list-style: none;
}

.audit-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar {
    display: flex;
    gap: 10px;
}

/* =========================================
   11. QR OUTPUT
   ========================================= */
.qr-output {
    display: none;
    justify-content: center;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease;
}

/* =========================================
   12. MODAL (POPUP)
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--container-bg);
    width: 90%;
    max-width: 500px;
    margin: 10vh auto;
    padding: 30px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

    .close-modal:hover {
        color: var(--text-primary);
    }

.modal-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 15px;
}

.modal-features-box {
    background: var(--result-bg);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

    .modal-features-box h4 {
        margin-bottom: 10px;
        color: var(--text-primary);
    }

    .modal-features-box ul {
        padding-left: 20px;
        color: var(--text-secondary);
        font-size: 0.9rem;
        list-style: none;
    }

.modal-action-btn {
    width: 100%;
    text-decoration: none;
}

/* =========================================
   13. FOOTER & DİĞERLERİ
   ========================================= */
footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.divider {
    margin: 0 10px;
    opacity: 0.3;
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
    display: none;
    animation: fadeIn 0.3s ease;
}

input.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .history-table th {
        text-align: left;
        padding: 12px;
        background-color: var(--result-bg);
        color: var(--text-secondary);
        font-weight: 600;
        border-bottom: 2px solid var(--border-color);
    }

    .history-table td {
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-primary);
    }

    .history-table tr:last-child td {
        border-bottom: none;
    }

/* Skor Renklendirme */
.score-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
}

.score-high {
    background: #d1fae5;
    color: #047857;
}

.score-med {
    background: #fef3c7;
    color: #b45309;
}

.score-low {
    background: #fee2e2;
    color: #b91c1c;
}

/* =========================================
   14. LOGIN & REGISTER SAYFASI TASARIMI
   ========================================= */

/* Login sayfasına özel body ayarı (Dikeyde ortalamak için) */
.login-body {
    align-items: center; /* Dikey ortalama */
    /* Diğer arka plan özellikleri yukarıdaki genel 'body'den miras alınır */
}

/* Login kutusunun kart tasarımı */
.login-container {
    background-color: var(--container-bg); /* Dark mode uyumlu */
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    /* margin-top: 0; Genel container'daki margin'i sıfırlar */
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Login sayfasındaki 'Giriş Yap' butonu */
.btn-full {
    width: 100%;
    padding: 14px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

    .btn-full:hover {
        background-color: var(--accent-hover);
        transform: translateY(-2px);
    }

/* Login altındaki linkler */
.login-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

    .login-footer a {
        color: var(--accent-color);
        text-decoration: none;
        font-weight: 600;
        transition: color 0.3s;
    }

    .login-footer a:hover {
        color: var(--accent-hover);
        text-decoration: underline;
    }

/* Uyarı Mesajları (Alerts) */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1); /* Kırmızı transparan */
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1); /* Yeşil transparan */
    color: var(--success);
    border: 1px solid var(--success);
}