:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #64748b;
    --accent: #10b981;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    color: var(--primary);
}

.logo span span {
    color: var(--primary);
}

nav {
    flex-grow: 1;
}

.nav-item {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

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

.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.header-title h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-title p {
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header h3 i {
    color: var(--primary);
}

/* Editor Card */
.editor-card {
    grid-column: span 8;
}

.editor-wrapper {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    min-height: 250px;
}

.line-numbers {
    padding-right: 1.5rem;
    color: var(--secondary);
    text-align: right;
    user-select: none;
    font-size: 0.85rem;
}

.line-numbers span {
    display: block;
}

textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    line-height: 1.5;
}

/* Stats Card */
.stats-card {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
}

.metrics-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 1rem 0 2rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.metric-value.success {
    color: var(--accent);
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audit-link {
    margin-top: auto;
}

/* Console Card */
.console-card {
    grid-column: span 12;
}

.console-output {
    background: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    height: 120px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.log-info {
    color: #a5b4fc;
    margin-bottom: 0.25rem;
}

.log-success {
    color: var(--accent);
}

.log-warn {
    color: #f59e0b;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

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

.btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn.large {
    width: 100%;
    padding: 1rem;
}

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

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

.btn.outline:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.1);
}

.btn.outline.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
}

/* Outcome Highlight Box */
.outcome-box {
    background: #1e40af; /* Deep Blue from screenshot */
    color: white;
    padding: 1rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    border-radius: 0 0 1rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.4s ease;
}

.outcome-box.hidden {
    display: none;
}

.outcome-box i {
    opacity: 0.8;
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1.5rem;
    margin-top: 1rem;
}

.guide-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 0.75rem;
    transition: all 0.4s ease;
}

.guide-item h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Interaction Highlights */
.guide-item.highlight {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.guide-item.highlight h4 {
    color: var(--text-main);
}
