:root {
    --primary-color: #6366F1; /* Modern Indigo */
    --primary-hover: #4F46E5;
    --bg-color: #F3F4F6;
    --panel-bg: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-heavy: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: 70px 1fr; /* Sol Bar | Sahne */
    grid-template-rows: 64px 1fr 56px; /* Üst | Sahne | Alt */
    overflow: hidden;
}

/* --- ÜST BAR (TOP BAR) --- */
.top-bar {
    grid-column: 1 / -1;
    grid-row: 1;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}
.logo-icon {
    background: var(--primary-color);
    color: white;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 14px;
}

.modules-nav {
    display: flex;
    gap: 10px;
}

/* Modül Butonları */
.module-wrapper { position: relative; }

.module-btn {
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-btn:hover, .module-btn.active {
    background: #EEF2FF;
    color: var(--primary-color);
}

.special-btn {
    background: #FFF7ED;
    color: #EA580C;
}
.special-btn:hover { background: #FFEDD5; }

/* --- STOR PERDE MENÜ (CURTAIN MENU ANIMATION) --- */
.curtain-menu {
    position: absolute;
    top: 100%; /* Butonun hemen altı */
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    width: 320px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-color);
    border-top: none;
    
    /* Animasyon Özellikleri */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
    visibility: hidden;
}

.curtain-menu.open {
    max-height: 400px; /* İçeriğe göre ayarla */
    opacity: 1;
    visibility: visible;
}

.menu-content { padding: 20px; }
.menu-content h4 { margin-bottom: 15px; font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.2s;
    font-size: 14px;
}
.tool-item:hover { background: #EEF2FF; color: var(--primary-color); }

/* --- SOL YAN PANEL (LEFT SIDEBAR) --- */
.left-sidebar {
    grid-column: 1;
    grid-row: 2 / -1;
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    z-index: 900;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover { background: var(--bg-color); color: var(--primary-color); }
.tool-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.color-picker-mini {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-bottom: 20px;
}
.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--border-color);
}

/* --- SAHNE (MAIN CANVAS) --- */
.canvas-area {
    grid-column: 2;
    grid-row: 2;
    background-color: #ffffff; /* Kanvas rengi */
    background-image: radial-gradient(#E5E7EB 1px, transparent 1px);
    background-size: 20px 20px; /* Noktalı kağıt efekti */
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    opacity: 0.5;
}
.empty-state i { font-size: 48px; margin-bottom: 10px; }

/* --- ALT BAR (BOTTOM BAR) --- */
.bottom-bar {
    grid-column: 2;
    grid-row: 3;
    background: var(--panel-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 900;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-color);
    padding: 4px;
    border-radius: 8px;
}

.page-nav, .page-add {
    border: none;
    background: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.page-add { background: var(--primary-color); color: white; }
.page-info { font-size: 13px; font-weight: 600; padding: 0 10px; }

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.zoom-val { font-size: 13px; font-weight: 600; width: 40px; text-align: center; }
.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-main);
    font-size: 16px;
    padding: 5px;
}