:root {
    --bg-main: #050509;
    --bg-elevated: #101018;
    --bg-elevated-soft: #151522;
    --border-soft: #252536;
    --accent: #ff3366;
    --accent-alt: #ff7a00;
    --accent-alt2: #b043ff;
    --text-main: #f5f5ff;
    --text-muted: #9a9abc;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-soft: 0 18px 40px rgba(0,0,0,0.55);
    --transition-fast: 0.18s ease-out;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #1a0b25 0%, #050509 40%, #010103 100%);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-content {
    padding-top: 64px;
    min-height: calc(100vh - 64px - 40px);
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(3, 3, 10, 0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.logo-text {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 12px;
    text-transform: uppercase;
    color: #ff4c7a;
}

.main-nav a {
    margin-right: 14px;
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.main-nav a:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.user-name {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    border-radius: 999px;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-alt2));
    color: #fff;
    box-shadow: 0 0 18px rgba(255, 51, 102, 0.45);
}

.btn-primary:hover {
    box-shadow: 0 0 26px rgba(255, 51, 102, 0.7);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.06);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
}

.btn-block {
    width: 100%;
}

/* Home */
.home-hero {
    position: relative;
    min-height: calc(100vh - 64px);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-hero .overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255,51,102,0.35), transparent 55%),
                radial-gradient(circle at bottom, rgba(176,67,255,0.30), transparent 60%),
                rgba(2,2,6,0.86);
}

.home-center {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 32px 16px;
    max-width: 760px;
    width: 100%;
}

.brand-title {
    margin-bottom: 26px;
}

.brand-main {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: linear-gradient(120deg, #ff4c7a, #ffb347, #b388ff);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(0,0,0,0.8);
}

/* Search box shared */
.search-box {
    max-width: 760px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(5,5,15,0.92);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: var(--shadow-soft);
    padding: 4px 6px 4px 16px;
    gap: 8px;
}

.search-input-wrapper input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    padding: 10px 8px;
    outline: none;
}

.search-input-wrapper .btn-primary {
    white-space: nowrap;
}

.search-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.55);
    position: relative;
    margin-right: 4px;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: rgba(255,255,255,0.65);
    border-radius: 999px;
    right: -5px;
    bottom: 0;
    transform: rotate(45deg);
}

.search-tabs {
    margin-top: 10px;
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(4,4,10,0.75);
    border: 1px solid rgba(255,255,255,0.08);
}

.search-tab {
    background: transparent;
    border: none;
    padding: 6px 16px;
    color: var(--text-muted);
    font-size: 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.search-tab.active {
    background: linear-gradient(120deg, rgba(255,51,102,0.16), rgba(176,67,255,0.16));
    color: #fff;
}

.trending-row {
    margin-top: 26px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

.trend-title {
    color: var(--text-muted);
    margin-right: 6px;
}

.trend-chip {
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.45);
    color: var(--text-main);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.trend-chip:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

/* Search results layout */
.search-layout {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.search-bar-stick {
    position: sticky;
    top: 64px;
    background: radial-gradient(circle at top, rgba(255,51,102,0.16), rgba(5,5,10,0.98));
    padding: 16px 0 10px;
    z-index: 20;
}

.search-box-inline .search-input-wrapper {
    max-width: none;
}

.search-filters {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.search-filters span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
}

.search-columns {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(260px, 1.2fr);
    gap: 24px;
    margin-top: 20px;
}

.search-main {
    min-height: 320px;
}

.result-card {
    background: rgba(5,5,15,0.96);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
    transition: border var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.result-card:hover {
    border-color: rgba(255,51,102,0.65);
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.7);
}

.result-url {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.result-title {
    font-size: 16px;
    margin: 0 0 6px;
    color: #ffefef;
}

.result-snippet {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.empty-text {
    color: var(--text-muted);
    margin-top: 40px;
}

.pagination {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 13px;
}

.page-info {
    font-size: 13px;
    color: var(--text-muted);
}

/* Side column / images */
.search-side {
    min-height: 260px;
}

.side-title {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.side-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.side-image-grid .image-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.side-card {
    background: rgba(7,7,18,0.96);
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    color: var(--text-muted);
}

/* Full image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.image-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    background: #111;
}

/* Settings */
.settings-layout {
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 16px 40px;
}

.settings-title {
    font-size: 24px;
    margin-bottom: 18px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.settings-card {
    background: rgba(8,8,18,0.98);
    border-radius: 18px;
    padding: 16px 18px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-soft);
    font-size: 14px;
}

.settings-card h2 {
    font-size: 16px;
    margin-top: 0;
}

.settings-inline {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.background-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 8px;
}

.bg-option {
    position: relative;
    display: block;
}

.bg-option input {
    position: absolute;
    opacity: 0;
}

.bg-thumb {
    display: block;
    height: 56px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--transition-fast), border var(--transition-fast);
}

.bg-option input:checked + .bg-thumb {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.field-label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.input, .select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.75);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.input:focus, .select:focus {
    border-color: var(--accent);
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Auth pages */
.auth-layout {
    min-height: calc(100vh - 64px - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background: radial-gradient(circle at top, rgba(255,51,102,0.22), rgba(5,5,10,0.98));
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: rgba(6,6,18,0.98);
    border-radius: 20px;
    padding: 24px 22px 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.10);
}

.auth-card h1 {
    margin: 0 0 4px;
    font-size: 22px;
}

.auth-subtitle {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-footer {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.auth-footer a {
    color: var(--accent);
}

/* Info */
.info-layout {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 16px 40px;
}

.info-list {
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Footer */
.footer {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(5,5,10,0.98);
}

/* Alerts */
.alert {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.alert.error {
    background: rgba(255, 84, 84, 0.18);
    border: 1px solid rgba(255, 84, 84, 0.6);
}

.alert.success {
    background: rgba(46, 204, 113, 0.14);
    border: 1px solid rgba(46, 204, 113, 0.6);
}

/* Responsive */
@media (max-width: 960px) {
    .search-columns {
        grid-template-columns: minmax(0,1fr);
    }
    .topbar {
        padding: 0 12px;
    }
    .main-nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .background-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .search-input-wrapper {
        padding-right: 4px;
    }
    .search-input-wrapper .btn-primary {
        padding-inline: 10px;
    }
}


/* Settings shell with sidebar */
.settings-shell {
    display: grid;
    grid-template-columns: 220px minmax(0,1fr);
    gap: 18px;
}

.settings-sidebar {
    background: rgba(6,6,16,0.98);
    border-radius: 18px;
    padding: 10px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: fit-content;
}

.sidebar-link {
    display: block;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-link.active {
    background: linear-gradient(120deg, rgba(255,51,102,0.28), rgba(176,67,255,0.26));
    color: #fff;
}

.settings-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* History list */
.history-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
}

.history-text span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.history-delete-form .btn-small {
    padding: 4px 8px;
    font-size: 11px;
}

/* Avatar & menu */
.avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    cursor: pointer;
}
.avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-initial {
    font-size: 14px;
    color: #fff;
}

.menu-wrapper {
    position: relative;
}
.icon-menu {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.menu-dropdown {
    position: absolute;
    right: 0;
    margin-top: 6px;
    min-width: 180px;
    background: rgba(8,8,18,0.98);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 14px 32px rgba(0,0,0,0.65);
    padding: 6px 0;
    display: none;
    z-index: 50;
}
.menu-dropdown.open {
    display: block;
}
.menu-dropdown a {
    display: block;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-main);
}
.menu-dropdown a:hover {
    background: rgba(255,255,255,0.05);
}
.menu-header {
    padding: 6px 14px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 4px;
}
.menu-user-name {
    font-size: 13px;
    color: var(--text-muted);
}

.badge-incognito {
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(71, 214, 138, 0.16);
    border: 1px solid rgba(71, 214, 138, 0.8);
    color: #8fffd0;
}

/* Profile avatar preview */
.profile-avatar-preview {
    margin-bottom: 10px;
}
.profile-avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

@media (max-width: 900px) {
    .settings-shell {
        grid-template-columns: minmax(0,1fr);
    }
}


/* === Modal tasarımı === */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}
.modal.open {
    display: block;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}
.modal-dialog {
    position: relative;
    margin: 7vh auto;
    max-width: 520px;
    background: #1d1d1f;
    color: #fafafa;
    padding: 24px 24px 18px;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0,0,0,.45);
}
.modal-dialog h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
}
.modal-dialog p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #ddd;
}
.modal-dialog ul {
    padding-left: 18px;
    margin-bottom: 14px;
}
.modal-actions {
    margin-top: 16px;
    text-align: right;
}

/* Hesap listesi */
.account-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.account-item {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,.03);
    color: #f5f5f7;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 6px;
}
.account-item:hover {
    background: rgba(255,255,255,.09);
}
.account-meta {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}
.account-email {
    font-size: 11px;
    opacity: .7;
}
.account-add-area {
    margin-top: 16px;
}
.account-add-form.hidden {
    display: none;
}

/* Menü içi buton */
.menu-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 14px;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.menu-link:hover {
    background: rgba(255,255,255,.06);
}

/* Gizli mod teması */
body.incognito-mode {
    background: #050507;
    color: #f5f5f5;
}
body.incognito-mode .topbar {
    background: #111118;
    border-bottom-color: #222;
}
body.incognito-mode .search-card,
body.incognito-mode .card,
body.incognito-mode .auth-card,
body.incognito-mode .settings-card {
    background: #15151c;
    box-shadow: 0 14px 35px rgba(0,0,0,.7);
}
body.incognito-mode input,
body.incognito-mode .input {
    background: #111119;
    color: #f5f5f5;
    border-color: #333;
}
body.incognito-mode .badge-incognito {
    background: #3b0744;
    color: #f9f1ff;
}
