:root {
    --primary: #ff6b00;
    --primary-hover: #e65a00;
    --bg-dark: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --accent-gradient: linear-gradient(135deg, #ff6b00 0%, #ff9e00 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* Sidebar */
aside {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    list-style: none;
}

nav li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 10px;
}

nav li:hover, nav li.active {
    background: var(--card-bg);
    color: var(--text-main);
}

nav li.active {
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* Main Content */
main {
    padding: 2rem;
}

header {
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-dim);
}

/* Modules Grid */
.module-section {
    display: none;
}

.module-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    padding: 1.5rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: var(--primary);
    margin-bottom: 0.8rem;
    display: inline-block;
}

/* Editor Section */
.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

textarea {
    width: 100%;
    height: 60vh;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    padding: 1rem;
    font-size: 1rem;
    resize: none;
}

.preview-area {
    height: 60vh;
    overflow-y: auto;
    padding: 1rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
}
