@import url("https://datamix.media/webfonts/Outfit/stylesheet.css");

:root {
    --color-primary: #000000;
    --color-primary-dark: #003267;
    --color-navy: #000000;
    --color-bg: #F8F5F1;
    --color-surface: rgba(255, 255, 255, 0.95);
    --color-border: rgba(0, 0, 0, 0.08);
    --color-muted: #6C757D;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    --sidebar-width: 240px;
    --r-main-font: 'Outfit', sans-serif;
    --r-heading-font: 'Outfit', sans-serif;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--color-bg);
    color: var(--color-navy);
    line-height: 1.5;
}

#app {
    height: 100%;
}

/* Let Reveal.js fully own its container — no overrides */
#app>.reveal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.reveal-viewport {
    background: var(--color-bg) !important;
}

.reveal .slides {
    text-align: left !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

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

.big-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

/* --- Dashboard --- */
.dashboard header {
    text-align: center;
    margin-bottom: 80px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.glass-panel {
    background: var(--color-surface);
    backdrop-filter: blur(15px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.slide-card h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 800;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 10px 18px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

/* --- Editor --- */
.editor-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-header {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

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

.filename {
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--color-navy);
}

.editor-main {
    flex: 1;
    display: flex;
    background: #FFF;
    overflow: hidden;
}

/* Sidebar */
.editor-sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--color-border);
    background: #F8F9FA;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-item {
    padding: 15px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
    align-items: center;
}

.sidebar-item:hover {
    border-color: var(--color-primary);
    transform: scale(1.02);
}

.sidebar-item .item-number {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--color-muted);
    background: #EEE;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.sidebar-item .item-label {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Editor Pane */
.editor-pane {
    flex: 1.2;
    border-right: 1px solid var(--color-border);
    background: #FFF;
    display: flex;
}

#markdown-input {
    width: 100%;
    height: 100%;
    padding: 50px;
    border: none;
    resize: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;
    font-size: 1.1rem;
    line-height: 1.7;
    background: transparent;
    outline: none;
    color: #333;
}

/* Preview Pane */
.preview-pane {
    flex: 1.5;
    background: #F0F2F5;
    overflow-y: auto;
    padding: 50px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.preview-inner section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.3s;
}

.preview-inner section:hover {
    transform: scale(1.01);
}

.preview-inner section::before {
    content: "Slide";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-muted);
    opacity: 0.4;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.back-link {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
    color: var(--color-navy);
    font-weight: 800;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .editor-sidebar {
        display: none;
    }
}

@media (max-width: 800px) {
    .preview-pane {
        display: none;
    }

    .editor-pane {
        flex: 1;
    }
}

/* --- i18n UI --- */
.lang-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.lang-tab {
    padding: 2px 8px 2px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-muted);
}

.lang-tab:hover {
    background: rgba(0, 0, 0, 0.1);
}

.lang-tab.active {
    background: var(--color-primary);
    color: white;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #EEE;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-muted);
    vertical-align: middle;
    margin-left: 5px;
}

.lang-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--color-primary);
    box-shadow: var(--shadow);
    z-index: 1000;
}