@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap');

:root {
    --primary: #00C250;
    /* Grasshopper Bright Green */
    --primary-dark: #009D41;
    --black: #000000;
    --white: #ffffff;
    --bg-light: #F9F9F9;
    --text-grey: #555555;
    --yellow: #FCE300;
    --red: #FF4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--black);
    min-height: 100vh;
}

/* Header & Nav */
header,
.dashboard-nav {
    background: #ffffff;
    color: #3C4043;
    padding: 0 5%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #E8EAED;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #3C4043;
    text-decoration: none;
}

.stat-item {
    background: #F8F9FA;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #5F6368;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn-grasshopper,
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    display: inline-block;
}

.btn-grasshopper:hover,
.btn-primary:hover {
    background: #00a845;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 194, 80, 0.2);
}

.main-content {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.progress-section {
    background: #ffffff;
    padding: 40px;
    border-radius: 30px;
    border: 1px solid #E8EAED;
    margin-bottom: 40px;
    animation: slideUp 0.6s ease;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f3f4;
    border-radius: 10px;
    margin: 24px 0 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
}

/* Lesson Cards */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.lesson-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid #E8EAED;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.lesson-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.lesson-status {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: inline-block;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: #E6F4EA;
    color: #1E8E3E;
}

.status-inprogress {
    background: #FEF7E0;
    color: #F9AB00;
}

.status-locked {
    background: #F1F3F4;
    color: #70757A;
}

/* Lesson Page */
.lesson-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 70px);
}

.instruction-panel {
    background: var(--white);
    padding: 40px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.editor-panel {
    display: flex;
    flex-direction: column;
}

.preview-area {
    height: 400px;
    background: #EAEAEA;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

#code-editor {
    width: 100%;
    flex-grow: 1;
    padding: 30px;
    font-size: 1.2rem;
    border: none;
    resize: none;
    outline: none;
    color: #202124;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    background: #fff;
    transition: background 0.3s;
}

/* Function Tray */
.function-tray {
    padding: 15px 30px;
    background: #fdfdfd;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.func-btn {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.func-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 194, 80, 0.3);
}

.console-output {
    background: #202124;
    color: #fff;
    padding: 20px 30px;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    border-top: 1px solid #333;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}