/* Design Tokens & Theme Variables */
:root {
    --bg-main: #070a13;
    --bg-surface: rgba(15, 23, 42, 0.6);
    --bg-surface-hover: rgba(30, 41, 59, 0.7);
    --bg-sidebar: rgba(10, 15, 30, 0.85);
    
    --neon-blue: #00f0ff;
    --neon-blue-glow: rgba(0, 240, 255, 0.25);
    --neon-magenta: #ff007f;
    --neon-magenta-glow: rgba(255, 0, 127, 0.25);
    --neon-green: #39ff14;
    --neon-green-glow: rgba(57, 255, 20, 0.25);
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #070a13;
    
    --border-color: rgba(0, 240, 255, 0.15);
    --border-color-glow: rgba(0, 240, 255, 0.35);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 320px;
    --header-height: 70px;
}

/* Light Theme Variables */
body.light-theme {
    --bg-main: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.8);
    --bg-surface-hover: rgba(241, 245, 249, 0.9);
    --bg-sidebar: rgba(255, 255, 255, 0.95);
    
    --neon-blue: #0284c7;
    --neon-blue-glow: rgba(2, 132, 199, 0.15);
    --neon-magenta: #db2777;
    --neon-magenta-glow: rgba(219, 39, 119, 0.15);
    --neon-green: #16a34a;
    --neon-green-glow: rgba(22, 163, 74, 0.15);
    
    --text-primary: #0f172a;
    --text-muted: #475569;
    --text-inverse: #ffffff;
    
    --border-color: rgba(2, 132, 199, 0.2);
    --border-color-glow: rgba(2, 132, 199, 0.4);
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    transition: background-color 0.5s ease, color 0.3s ease;
}

/* Animated Space Background */
.space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 40px 70px, rgba(255,255,255,0.7), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, rgba(0,240,255,0.5), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 120px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    opacity: 0.15;
}

/* Decorative Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    transition: var(--transition-smooth);
}

.glow-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
    top: -10vw;
    right: -10vw;
    animation: orbFloat 25s infinite alternate ease-in-out;
}

.glow-2 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--neon-magenta) 0%, transparent 70%);
    bottom: -15vw;
    left: -15vw;
    animation: orbFloat 35s infinite alternate-reverse ease-in-out;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* App Layout */
#app-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--neon-blue-glow);
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
}

.neon-blue-icon {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 5px var(--neon-blue));
}

.animate-spin-slow {
    animation: spin 12s linear infinite;
}

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

.search-box {
    margin: 16px 24px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.search-box:focus-within {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue-glow);
    background: rgba(255, 255, 255, 0.08);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.search-box i {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 16px 24px 16px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.nav-section-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin: 16px 8px 8px 8px;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 4px;
}

.toc-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border-left: 2px solid transparent;
}

.toc-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
    padding-left: 16px;
}

.toc-link.active {
    color: var(--neon-blue);
    background: var(--neon-blue-glow);
    border-left-color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

/* Content Wrapper */
#content-wrapper {
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header Styling */
#main-header {
    height: var(--header-height);
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 90;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 6px 16px;
    border-radius: 18px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.tab-btn i {
    width: 14px;
    height: 14px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--neon-blue);
    color: var(--text-inverse);
    box-shadow: 0 0 12px var(--neon-blue-glow);
}

/* Reader Settings Controls */
.reader-settings {
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

/* Icon Buttons */
.btn-icon {
    background: none;
    border: 1px solid transparent;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

#btn-theme-toggle .sun-icon {
    display: none;
}
#btn-theme-toggle .moon-icon {
    display: block;
}

body.light-theme #btn-theme-toggle .sun-icon {
    display: block;
}
body.light-theme #btn-theme-toggle .moon-icon {
    display: none;
}

/* Reading Progress Bar */
#progress-bar-container {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 95;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-magenta));
    box-shadow: 0 0 8px var(--neon-blue-glow);
    transition: width 0.1s ease-out;
}

/* Viewport Main Area */
#main-viewport {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

/* Tab Panes */
.tab-pane {
    display: none;
    height: 100%;
    width: 100%;
}

.tab-pane.active {
    display: block;
}

#book-content-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 16px 24px 80px 24px;
}

/* Home / Splash Screen View */
.hero-section {
    text-align: center;
    padding: 15px 0 30px 0;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--neon-magenta-glow);
    border: 1px solid var(--neon-magenta);
    color: var(--neon-magenta);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.1);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 40%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 44px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    color: var(--text-inverse);
    box-shadow: 0 0 20px var(--neon-blue-glow);
}

.btn-primary:hover {
    background: transparent;
    color: var(--neon-blue);
    box-shadow: 0 0 30px var(--neon-blue-glow);
}

.btn-peer-review {
    background: var(--neon-magenta);
    border: 1px solid var(--neon-magenta);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--neon-magenta-glow);
}

.btn-peer-review:hover {
    background: transparent;
    color: var(--neon-magenta);
    box-shadow: 0 0 30px var(--neon-magenta-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue-glow);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 48px 0;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color-glow);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon i {
    width: 24px;
    height: 24px;
}

.neon-blue-bg { background: var(--neon-blue-glow); color: var(--neon-blue); }
.neon-magenta-bg { background: var(--neon-magenta-glow); color: var(--neon-magenta); }
.neon-green-bg { background: var(--neon-green-glow); color: var(--neon-green); }

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.quote-card-home {
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.05) 0%, rgba(0, 240, 255, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    position: relative;
}

.quote-card-home p {
    font-style: italic;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.quote-card-home span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Markdown Reader Custom Styles (Premium Book Typography) */
.markdown-body {
    font-size: var(--reader-font-size, 1.05rem);
    line-height: 1.75;
}

.markdown-body h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin: 40px 0 24px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    line-height: 1.25;
}

.markdown-body h2 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    margin: 36px 0 18px 0;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

.markdown-body h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 30px 0 14px 0;
    color: var(--neon-magenta);
}

.markdown-body p {
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Blockquotes (Orijinal Tasarım) */
.markdown-body blockquote {
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--neon-blue);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* GitHub style Alerts */
.markdown-body blockquote.alert {
    font-style: normal;
    border-radius: 6px;
    border-left-width: 4px;
}

.markdown-body blockquote.alert-note {
    border-left-color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.05);
}
.markdown-body blockquote.alert-note::before {
    content: "🔍 BİLGİ / NOT";
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--neon-blue);
    display: block;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.markdown-body blockquote.alert-important {
    border-left-color: var(--neon-magenta);
    background: rgba(255, 0, 127, 0.05);
}
.markdown-body blockquote.alert-important::before {
    content: "⚠️ ÖNEMLİ BEYAN";
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--neon-magenta);
    display: block;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.markdown-body blockquote.alert-tip {
    border-left-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.05);
}
.markdown-body blockquote.alert-tip::before {
    content: "💡 TEKNİK AÇIKLAMA / İPUCU";
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--neon-green);
    display: block;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

/* Lists */
.markdown-body ul, .markdown-body ol {
    margin: 0 0 20px 24px;
}

.markdown-body li {
    margin-bottom: 8px;
}

.markdown-body li::marker {
    color: var(--neon-blue);
}

/* KaTeX Formulas Container */
.katex-display {
    margin: 28px 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 0;
}

.katex {
    font-size: 1.1em;
}

/* Inline Code Blocks */
.markdown-body code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--neon-blue);
}

/* Image styling */
.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 32px auto;
    display: block;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.markdown-body img:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 15px 35px var(--neon-blue-glow);
}

/* Tables */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.markdown-body th, .markdown-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.markdown-body th {
    background-color: rgba(255, 255, 255, 0.03);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--neon-blue);
    border-bottom: 2px solid var(--border-color);
}

.markdown-body tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.01);
}

.markdown-body tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Reader Footer Navigation */
.reader-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

/* Simulation Tab Pane */
.simulation-container {
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.simulation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.sim-title h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--neon-blue);
    text-shadow: 0 0 8px var(--neon-blue-glow);
}

.sim-title p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.iframe-wrapper {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

#sim-frame {
    width: 100%;
    height: 100%;
}

/* Fade-in Animation */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

/* Peer Review Banner Styling */
.peer-review-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.08) 0%, rgba(0, 240, 255, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    margin: 32px 0;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.peer-review-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--neon-magenta), var(--neon-blue));
}

.peer-review-banner:hover {
    transform: translateY(-3px);
    border-color: var(--neon-magenta);
    box-shadow: 0 10px 30px rgba(255, 0, 127, 0.1);
}

.peer-review-content {
    flex-grow: 1;
    padding-right: 24px;
}

.peer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--neon-magenta-glow);
    border: 1px solid var(--neon-magenta);
    color: var(--neon-magenta);
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.peer-badge i {
    width: 12px;
    height: 12px;
}

.peer-review-banner h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.peer-review-banner p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.peer-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--neon-magenta);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.peer-review-banner:hover .peer-action {
    color: var(--neon-blue);
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .peer-review-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .peer-review-content {
        padding-right: 0;
    }
}

/* Mobile responsive styling overrides */
.mobile-only {
    display: none;
}

@media (max-width: 900px) {
    #sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        box-shadow: 15px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    #sidebar.open {
        left: 0;
    }
    
    .mobile-only {
        display: flex;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .header-title h1 {
        max-width: 200px;
    }
    
    .nav-tabs span {
        display: none;
    }
}

/* ==========================================
   SPLASH SCREEN INTRO ANIMATION STYLES
   ========================================== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050811; /* Dark space background */
    z-index: 10000; /* Must cover everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
    overflow: hidden;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    position: relative;
    z-index: 2;
}

/* 4D Vortex Animation Container */
.vortex-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 800px;
}

/* Pulsating Core (Nucleon) */
.vortex-core {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, var(--neon-blue) 60%, var(--neon-magenta) 100%);
    box-shadow: 0 0 30px var(--neon-blue), 0 0 60px var(--neon-magenta);
    position: absolute;
    animation: corePulse 2s infinite alternate ease-in-out;
    z-index: 10;
}

@keyframes corePulse {
    0% { transform: scale(0.9); box-shadow: 0 0 25px var(--neon-blue), 0 0 50px var(--neon-magenta); }
    100% { transform: scale(1.15); box-shadow: 0 0 45px var(--neon-blue), 0 0 90px var(--neon-magenta); }
}

/* Rotating Vortex Rings */
.vortex-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

/* Symmetrical 4D projection loops */
.ring-1 {
    width: 140px;
    height: 140px;
    border-top: 2px solid var(--neon-blue);
    border-bottom: 2px solid var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue-glow);
    animation: spinClockwise 3.5s infinite linear;
    transform: rotateX(60deg) rotateY(20deg);
}

.ring-2 {
    width: 180px;
    height: 180px;
    border-left: 2px solid var(--neon-magenta);
    border-right: 2px solid var(--neon-magenta);
    box-shadow: 0 0 15px var(--neon-magenta-glow);
    animation: spinCounterClockwise 4.5s infinite linear;
    transform: rotateX(45deg) rotateY(-30deg);
}

.ring-3 {
    width: 220px;
    height: 220px;
    border-top: 1.5px solid var(--neon-green);
    border-bottom: 1.5px solid var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green-glow);
    animation: spinClockwise 6s infinite linear;
    transform: rotateX(-55deg) rotateY(45deg);
}

@keyframes spinClockwise {
    0% { transform: rotate3d(1, 1, 1, 0deg); }
    100% { transform: rotate3d(1, 1, 1, 360deg); }
}

@keyframes spinCounterClockwise {
    0% { transform: rotate3d(1, -1, 1, 360deg); }
    100% { transform: rotate3d(1, -1, 1, 0deg); }
}

/* Splash Typography */
.splash-text {
    text-align: center;
}

.splash-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 40%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px var(--neon-blue-glow);
    animation: textGlow 3s infinite alternate ease-in-out;
}

.splash-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.splash-statement {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(255, 0, 127, 0.08);
    border: 2px solid rgba(255, 0, 127, 0.4);
    border-radius: 16px;
    padding: 18px 48px;
    margin-top: 36px;
    letter-spacing: 1.5px;
    text-shadow: 0 0 20px rgba(255, 0, 127, 0.95), 0 0 40px rgba(255, 0, 127, 0.6);
    box-shadow: 0 0 40px rgba(255, 0, 127, 0.25), inset 0 0 25px rgba(255, 0, 127, 0.15);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
    animation: statementExpand 3.2s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
}

@keyframes statementExpand {
    0% {
        transform: scale(0.75);
        opacity: 0;
        letter-spacing: 0.5px;
        border-color: rgba(255, 0, 127, 0.1);
        box-shadow: 0 0 15px rgba(255, 0, 127, 0), inset 0 0 10px rgba(255, 0, 127, 0);
        text-shadow: 0 0 5px rgba(255, 0, 127, 0);
    }
    100% {
        transform: scale(1.1);
        opacity: 1;
        letter-spacing: 2px;
        border-color: rgba(255, 0, 127, 0.55);
        box-shadow: 0 0 45px rgba(255, 0, 127, 0.3), inset 0 0 30px rgba(255, 0, 127, 0.18);
        text-shadow: 0 0 25px rgba(255, 0, 127, 0.98), 0 0 45px rgba(255, 0, 127, 0.6);
    }
}

@keyframes textGlow {
    0% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0)); }
    100% { filter: drop-shadow(0 0 15px var(--neon-blue-glow)); }
}

/* Skip Button */
#btn-skip-intro {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 18px;
    font-size: 0.8rem;
    border-radius: 20px;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
}

#btn-skip-intro:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--neon-blue);
    color: var(--text-primary);
    box-shadow: 0 0 15px var(--neon-blue-glow);
    transform: translateY(-1px);
}

#btn-skip-intro i {
    width: 14px;
    height: 14px;
}

/* User Profile Menu in Header */
.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
}

#user-display-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modals (Overlay & Card) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 17, 0.8);
    backdrop-filter: blur(8px);
    z-index: 11000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.1);
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2px;
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.auth-tab-btn.active {
    background: var(--neon-blue);
    color: var(--text-inverse);
}

/* Forms & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue-glow);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

#form-auth button[type="submit"] {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* Social Login */
.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.auth-divider span {
    background: var(--bg-sidebar);
    padding: 0 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
}

.social-google { color: #ea4335; }
.social-github { color: var(--text-primary); }

/* Comments Section */
.comments-section {
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 36px;
}

.comments-section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.comment-guest-card {
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.comment-guest-card p {
    color: var(--text-muted);
    margin: 0;
}

#comment-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    resize: vertical;
    transition: var(--transition-smooth);
    margin-bottom: 12px;
}

#comment-textarea:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue-glow);
    background: rgba(255, 255, 255, 0.06);
}

.comment-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 32px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.comment-author {
    font-weight: 600;
    color: var(--neon-blue);
}

.comment-date {
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Discussion Forum Pane */
.forum-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

.forum-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.btn-new-thread {
    width: 100%;
    justify-content: center;
}

.forum-categories h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.forum-categories ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.forum-categories li {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.forum-categories li:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.forum-categories li.active {
    color: var(--neon-blue);
    background: var(--neon-blue-glow);
    font-weight: 600;
}

.forum-board {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    min-height: 500px;
}

.forum-threads {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thread-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.thread-card:hover {
    border-color: var(--border-color-glow);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.thread-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.thread-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
}

.thread-badge.genel { background: rgba(0, 240, 255, 0.1); color: var(--neon-blue); border: 1px solid var(--neon-blue); }
.thread-badge.fizik { background: rgba(255, 0, 127, 0.1); color: var(--neon-magenta); border: 1px solid var(--neon-magenta); }
.thread-badge.deneyler { background: rgba(57, 255, 20, 0.1); color: var(--neon-green); border: 1px solid var(--neon-green); }

.thread-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.thread-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Thread Detail View */
.btn-back-forum {
    margin-bottom: 24px;
}

.thread-op-card {
    background: rgba(255, 0, 127, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.thread-op-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.thread-op-body {
    line-height: 1.6;
    margin-top: 16px;
}

.replies-header h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: var(--neon-blue);
}

.replies-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.reply-card {
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--border-color);
    padding: 16px 20px;
}

.reply-write-area {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

#reply-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    resize: vertical;
    margin-bottom: 12px;
}

#reply-textarea:focus {
    border-color: var(--neon-blue);
}

@media (max-width: 768px) {
    .forum-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   FEATURES DIAGRAM STYLES
   ========================================== */
.features-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
}

.diagram-top {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 5px;
    z-index: 2;
}

/* SADECE BUNLAR! Badge styling */
.only-these-badge {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(0, 240, 255, 0.08);
    border: 2px solid var(--neon-blue);
    border-radius: 12px;
    padding: 14px 42px;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 0 0 15px var(--neon-blue-glow);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.25), inset 0 0 15px rgba(0, 240, 255, 0.1);
    animation: badgePulse 2s infinite alternate ease-in-out;
}

.badge-subtext {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon-magenta);
    text-shadow: 0 0 10px var(--neon-magenta-glow);
    margin-top: 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.97);
        border-color: var(--neon-blue);
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.2), inset 0 0 10px rgba(0, 240, 255, 0.05);
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
    }
    100% {
        transform: scale(1.03);
        border-color: var(--neon-magenta);
        box-shadow: 0 0 40px rgba(255, 0, 127, 0.35), inset 0 0 20px rgba(255, 0, 127, 0.15);
        text-shadow: 0 0 20px rgba(255, 0, 127, 0.9), 0 0 30px rgba(255, 0, 127, 0.4);
    }
}

.diagram-connectors {
    width: 100%;
    max-width: 500px;
    height: 90px;
    margin-top: -5px;
    margin-bottom: 5px;
    z-index: 1;
}

.diagram-connectors svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Two columns grid for diagram bottom */
.features-grid.two-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 30px;
    margin: 48px 0;
}

@media (max-width: 768px) {
    .features-grid.two-cols {
        grid-template-columns: 1fr;
    }
    .diagram-connectors {
        display: none; /* Hide svg connectors on mobile since items stack vertically */
    }
}

/* ==========================================
   ANALYTICS STATS MODAL STYLES
   ========================================== */
.stats-modal-card {
    max-width: 500px !important;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

.stat-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-detail-section h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.stats-list::-webkit-scrollbar {
    width: 4px;
}
.stats-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-text strong {
    color: var(--text-primary);
}

.stat-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-magenta));
    border-radius: 3px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-list-horizontal {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
}

.stat-item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-item-sub span {
    color: var(--neon-blue);
    font-weight: 700;
}
