/* =========================================
   LEARN PYTHON PROGRAMMING LAB - UI THEME
   Built by Kush-Tech Solutions
   ========================================= */

/* Import Premium Web Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
    /* Color Palette */
    --bg-main: #f8fafc;          /* Light Slate for background */
    --bg-surface: #ffffff;       /* Pure white for panels */
    --text-primary: #0f172a;     /* Deep Slate for main text */
    --text-secondary: #475569;   /* Muted Slate for paragraphs */
    --brand-primary: #0f766e;    /* Deep Kush-Tech Teal */
    --brand-hover: #115e59;      /* Darker Teal for hover states */
    --terminal-bg: #0f172a;      /* Rich dark background for terminal */
    --terminal-text: #10b981;    /* Hacker Emerald Green */
    --border-light: #e2e8f0;
    
    /* Effects & Shadows */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

/* ================= Navbar ================= */
.navbar {
    background: linear-gradient(135deg, #0f766e 0%, #0b5345 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.navbar h1 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}

/* ================= Buttons ================= */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    backdrop-filter: blur(5px);
    margin-left: 10px;
}

.btn-outline:hover {
    background: white;
    color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(15, 118, 110, 0.2);
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 118, 110, 0.3);
}

.btn-action {
    background-color: #10b981; /* Success Green */
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.btn-action:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

/* ================= Main Layout ================= */
.container {
    display: flex;
    flex: 1;
    padding: 2rem 3rem;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.instructions-pane, .editor-pane {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-float);
    width: 50%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

/* ================= Instructions Pane ================= */
.instructions-pane h2 {
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

.instructions-pane p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.module-selector {
    margin-bottom: 2rem;
}

select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: #f1f5f9;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none; /* Removes default OS styling */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
}

select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.exercise-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--brand-primary);
    flex-grow: 1;
}

.exercise-content h3 {
    margin-bottom: 0.5rem;
}

/* AI Feedback Box */
.ai-feedback {
    background: linear-gradient(to right, #f0fdfa, #e0f2f1);
    padding: 1.5rem;
    border: 1px solid #ccfbf1;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    color: #115e59;
    font-size: 0.95rem;
    animation: fadeIn 0.4s ease-out;
}

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

/* ================= Editor & Terminal Pane ================= */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

/* CodeMirror Overrides */
.CodeMirror {
    height: 400px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Fira Code', monospace;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* The Beautiful Terminal */
.terminal {
    background-color: var(--terminal-bg);
    color: var(--terminal-text);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
    flex: 1;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.3);
    position: relative;
}

/* Mac-style terminal dots */
.terminal::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56; /* Red */
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f; /* Yellow & Green */
    margin-bottom: 15px;
}

.terminal h4 {
    display: none; /* Hide the text header in favor of the mac dots */
}

#output {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Custom Scrollbars for Terminal and Editor */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ================= Footer ================= */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    .instructions-pane, .editor-pane {
        width: 100%;
    }
    .CodeMirror {
        height: 300px;
    }
}