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

:root {
    /* Default Light Mode - Green Palette */
    --primary-dark: #013220;
    --primary-medium: #014421;
    --primary-hunter: #355E3B;
    --primary-moss: #8A9A5B;
    --primary-sage: #BCB88A;

    --bg-gradient-start: #e8f5e9;
    --bg-gradient-end: #c8e6c9;
    --accent-color: #355E3B;
    --accent-light: #8A9A5B;
    --accent-lighter: #BCB88A;
    --btn-primary: #355E3B;
    --btn-primary-hover: #014421;
    --btn-secondary: #8A9A5B;
    --btn-secondary-hover: #6b7a4a;
    --text-primary: #1a1a1a;
    --text-secondary: #2c3e2f;
    --text-on-primary: #ffffff;
    --bg-white: #f5f9f5;
    --bg-light: #e8f2e8;
    --bg-card: #f8fdf8;
    --border-color: #8A9A5B;
    --input-border: #8A9A5B;
    --input-focus: #355E3B;
    --shadow: rgba(1, 68, 33, 0.12);
    --shadow-hover: rgba(1, 68, 33, 0.20);
    --code-bg: #1e1e1e;
    --code-text: #d4d4d4;
    --output-bg: #2a2d2a;
}

/* Light Mode - Pink Palette */
body[data-theme="pink"] {
    --primary-dark: #4B1942;
    --primary-medium: #73264D;
    --primary-hunter: #B8336A;
    --primary-moss: #C74375;
    --primary-sage: #E91E63;

    --bg-gradient-start: #fce4ec;
    --bg-gradient-end: #f8bbd0;
    --accent-color: #E91E63;
    --accent-light: #FF69B4;
    --accent-lighter: #FFB6C1;
    --btn-primary: #E91E63;
    --btn-primary-hover: #B8336A;
    --btn-secondary: #FF69B4;
    --btn-secondary-hover: #E91E63;
    --text-primary: #1a1a1a;
    --text-secondary: #4a1a36;
    --text-on-primary: #ffffff;
    --bg-white: #fff5f8;
    --bg-light: #ffe8f0;
    --bg-card: #fffbfc;
    --border-color: #FF69B4;
    --input-border: #FF69B4;
    --input-focus: #E91E63;
    --shadow: rgba(184, 51, 106, 0.12);
    --shadow-hover: rgba(184, 51, 106, 0.20);
}

/* Light Mode - Blue Palette */
body[data-theme="blue"] {
    --primary-dark: #0A2540;
    --primary-medium: #1E3A5F;
    --primary-hunter: #1E3A8A;
    --primary-moss: #2563EB;
    --primary-sage: #00BFFF;

    --bg-gradient-start: #e3f2fd;
    --bg-gradient-end: #bbdefb;
    --accent-color: #1E3A8A;
    --accent-light: #2563EB;
    --accent-lighter: #00BFFF;
    --btn-primary: #1E3A8A;
    --btn-primary-hover: #0A2540;
    --btn-secondary: #00BFFF;
    --btn-secondary-hover: #2563EB;
    --text-primary: #1a1a1a;
    --text-secondary: #1a3a5f;
    --text-on-primary: #ffffff;
    --bg-white: #f0f8ff;
    --bg-light: #e8f4fd;
    --bg-card: #f8fcff;
    --border-color: #00BFFF;
    --input-border: #00BFFF;
    --input-focus: #1E3A8A;
    --shadow: rgba(0, 191, 255, 0.12);
    --shadow-hover: rgba(0, 191, 255, 0.20);
}

/* Light Mode - Red Palette */
body[data-theme="red"] {
    --primary-dark: #2B0000;
    --primary-medium: #4B0000;
    --primary-hunter: #800000;
    --primary-moss: #A00000;
    --primary-sage: #C00000;

    --bg-gradient-start: #ffebee;
    --bg-gradient-end: #ffcdd2;
    --accent-color: #800000;
    --accent-light: #A00000;
    --accent-lighter: #DC143C;
    --btn-primary: #A00000;
    --btn-primary-hover: #4B0000;
    --btn-secondary: #DC143C;
    --btn-secondary-hover: #A00000;
    --text-primary: #1a1a1a;
    --text-secondary: #4a0000;
    --text-on-primary: #ffffff;
    --bg-white: #fff8f8;
    --bg-light: #ffe8e8;
    --bg-card: #fffbfb;
    --border-color: #DC143C;
    --input-border: #DC143C;
    --input-focus: #A00000;
    --shadow: rgba(160, 0, 0, 0.12);
    --shadow-hover: rgba(160, 0, 0, 0.20);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Dark Mode - Default Green Palette */
body.dark-mode {
    --primary-dark: #013220;
    --primary-medium: #014421;
    --primary-hunter: #355E3B;
    --primary-moss: #6b7a4a;
    --primary-sage: #9a9670;

    --bg-gradient-start: #0a1f14;
    --bg-gradient-end: #1a3326;
    --accent-color: #6b7a4a;
    --accent-light: #8A9A5B;
    --accent-lighter: #9a9670;
    --btn-primary: #6b7a4a;
    --btn-primary-hover: #8A9A5B;
    --btn-secondary: #8A9A5B;
    --btn-secondary-hover: #9a9670;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-on-primary: #ffffff;
    --bg-white: #1e2921;
    --bg-light: #131a16;
    --bg-card: #1e2921;
    --border-color: #6b7a4a;
    --input-border: #6b7a4a;
    --input-focus: #8A9A5B;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --code-bg: #0f1511;
    --code-text: #ffffff;
    --output-bg: #0a0f0c;
}

/* Dark Mode - Pink Palette */
body.dark-mode[data-theme="pink"] {
    --primary-dark: #4B1942;
    --primary-medium: #73264D;
    --primary-hunter: #B8336A;
    --primary-moss: #C74375;
    --primary-sage: #E91E63;

    --bg-gradient-start: #4B1942;
    --bg-gradient-end: #73264D;
    --accent-color: #C74375;
    --accent-light: #E91E63;
    --accent-lighter: #FF69B4;
    --btn-primary: #C74375;
    --btn-primary-hover: #E91E63;
    --btn-secondary: #E91E63;
    --btn-secondary-hover: #FF69B4;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-on-primary: #ffffff;
    --bg-white: #2d1529;
    --bg-light: #1f0f1c;
    --bg-card: #2d1529;
    --border-color: #C74375;
    --input-border: #C74375;
    --input-focus: #E91E63;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --code-bg: #1a0a15;
    --code-text: #ffffff;
    --output-bg: #150a12;
}

/* Dark Mode - Blue Palette */
body.dark-mode[data-theme="blue"] {
    --primary-dark: #0A2540;
    --primary-medium: #1E3A5F;
    --primary-hunter: #1E3A8A;
    --primary-moss: #2563EB;
    --primary-sage: #00BFFF;

    --bg-gradient-start: #0A2540;
    --bg-gradient-end: #1E3A5F;
    --accent-color: #2563EB;
    --accent-light: #00BFFF;
    --accent-lighter: #3B82F6;
    --btn-primary: #2563EB;
    --btn-primary-hover: #00BFFF;
    --btn-secondary: #00BFFF;
    --btn-secondary-hover: #3B82F6;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-on-primary: #ffffff;
    --bg-white: #1a2d47;
    --bg-light: #0f1923;
    --bg-card: #1a2d47;
    --border-color: #2563EB;
    --input-border: #2563EB;
    --input-focus: #00BFFF;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --code-bg: #0a1420;
    --code-text: #ffffff;
    --output-bg: #050f1a;
}

/* Dark Mode - Red Palette */
body.dark-mode[data-theme="red"] {
    --primary-dark: #2B0000;
    --primary-medium: #4B0000;
    --primary-hunter: #800000;
    --primary-moss: #A00000;
    --primary-sage: #DC143C;

    --bg-gradient-start: #4B0000;
    --bg-gradient-end: #2B0000;
    --accent-color: #A00000;
    --accent-light: #DC143C;
    --accent-lighter: #FF4444;
    --btn-primary: #A00000;
    --btn-primary-hover: #DC143C;
    --btn-secondary: #DC143C;
    --btn-secondary-hover: #FF4444;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-on-primary: #ffffff;
    --bg-white: #2d0a0a;
    --bg-light: #1a0000;
    --bg-card: #2d0a0a;
    --border-color: #A00000;
    --input-border: #A00000;
    --input-focus: #DC143C;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --code-bg: #1a0000;
    --code-text: #ffffff;
    --output-bg: #0f0000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Login & Signup Wrapper */
.login-wrapper, .signup-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.5s ease;
}

.signup-wrapper {
    max-width: 600px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Styles */
.login-header, .signup-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1, .signup-header h1 {
    color: var(--text-primary);
    font-size: 2em;
    margin-bottom: 10px;
}

.login-header p, .signup-header p {
    color: var(--text-primary);
    font-size: 1em;
    line-height: 1.5;
    display: inline-block;
    vertical-align: middle;
}

body.dark-mode .login-header h1,
body.dark-mode .signup-header h1,
body.dark-mode .login-header p,
body.dark-mode .signup-header p {
    color: #ffffff;
}

/* Tab Styles */
.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--bg-light);
    border-color: var(--accent-color);
}

.tab-btn.active {
    background: var(--accent-color);
    color: var(--text-on-primary);
    border-color: var(--accent-color);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Styles */
.login-form, .signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95em;
}

body.dark-mode .form-group label {
    color: #ffffff;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px var(--shadow);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.btn-secondary {
    background: var(--btn-secondary);
    color: var(--text-on-primary);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
}

.btn-success {
    background: var(--btn-secondary);
    color: var(--text-on-primary);
}

.btn-success:hover {
    background: var(--btn-secondary-hover);
}

.btn-danger {
    background: #dc3545;
    color: var(--text-on-primary);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Links */
.signup-link, .login-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-primary);
}

.signup-link a, .login-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover, .login-link a:hover {
    text-decoration: underline;
}

body.dark-mode .signup-link,
body.dark-mode .login-link {
    color: #ffffff;
}

body.dark-mode .signup-link a,
body.dark-mode .login-link a {
    color: #ffffff;
}

/* Enrollment Section */
.enrollment-section {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.enrollment-section label {
    font-size: 1.1em;
    color: var(--primary-hunter);
    margin-bottom: 10px;
}

.help-text {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.subjects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.subject-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.subject-item:hover {
    border-color: var(--primary-hunter);
    box-shadow: 0 2px 8px rgba(53, 94, 59, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.subject-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.subject-info strong {
    color: var(--text-primary);
    font-size: 1em;
}

.subject-code {
    color: var(--primary-hunter);
    font-size: 0.85em;
    font-weight: 600;
}

body.dark-mode .subject-code {
    color: white;
}

.instructor-name {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.no-subjects {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-hover));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 var(--shadow-hover);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand h2 {
    color: white;
    font-size: 1.5em;
    margin: 0;
}

.nav-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-moss);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
}

.nav-link.logout:hover {
    background: #dc3545;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-light);
    min-height: calc(100vh - 70px);
}

/* Dashboard Header */
.dashboard-header {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: 30px;
}

body.dark-mode .dashboard-header {
    background: rgba(30, 41, 33, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
}

.welcome-section h1 {
    color: var(--text-primary);
    font-size: 2em;
    margin-bottom: 10px;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 16px var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-hover);
    border-color: var(--accent-color);
}

.stat-icon {
    font-size: 3em;
}

.stat-info h3 {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    color: var(--primary-hunter);
    font-size: 2em;
    font-weight: bold;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 16px var(--shadow);
}

.dashboard-section.full-width {
    grid-column: 1 / -1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    border-bottom-opacity: 0.3;
}

body.dark-mode .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.4em;
}

.view-all-link {
    color: var(--primary-hunter);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Activities List */
.activities-list, .scores-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item, .score-item {
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.activity-item:hover, .score-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px var(--shadow);
}

.activity-info h4, .score-info h4 {
    color: var(--text-primary);
    font-size: 1.1em;
    margin-bottom: 8px;
}

.subject-tag {
    display: inline-block;
    background: var(--primary-hunter);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 5px;
}

.due-date, .submitted-date {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.score-badge {
    display: flex;
    align-items: center;
}

.score-value {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 10px;
}

.score-value.passing {
    color: var(--btn-secondary);
    background: var(--bg-light);
    border: 1px solid var(--btn-secondary);
}

.score-value.failing {
    color: #dc3545;
    background: var(--bg-light);
    border: 1px solid #dc3545;
}

.score-value.pending {
    color: #ffc107;
    background: var(--bg-light);
    border: 1px solid #ffc107;
    font-size: 1em;
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.subject-card {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-hover));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-on-primary);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 var(--shadow);
    transition: all 0.3s;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.subject-header {
    margin-bottom: 15px;
}

.subject-header h3 {
    font-size: 1.4em;
    margin-bottom: 8px;
}

.subject-header .subject-code {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
}

.subject-description {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
}

.subject-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.subject-footer .instructor {
    font-size: 0.9em;
    opacity: 0.9;
}

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

.subject-footer .btn:hover {
    background: var(--primary-sage);
}

/* Empty Message */
.empty-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-size: 1.1em;
}

.empty-message a {
    color: var(--primary-hunter);
    text-decoration: none;
    font-weight: 600;
}

.empty-message a:hover {
    text-decoration: underline;
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: -5px 0 32px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

body.dark-mode .notifications-panel {
    background: rgba(30, 41, 33, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-panel.open {
    right: 0;
}

.notifications-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-hunter) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    font-size: 1.3em;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
}

.notifications-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.notification-item {
    padding: 15px;
    background: rgba(188, 184, 138, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-hunter);
}

body.dark-mode .notification-item {
    background: rgba(107, 122, 74, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.notification-item.unread {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.notification-item p {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.notif-time {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.notif-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-hunter);
    text-decoration: none;
    font-weight: 600;
}

.notif-link:hover {
    text-decoration: underline;
}

/* Code Editor */
.code-editor-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: 20px;
}

body.dark-mode .code-editor-container {
    background: rgba(30, 41, 33, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
}

body.dark-mode #detected-prompts {
    background: rgba(30, 41, 33, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Detected Prompts Box */
.detected-prompts-box {
    background: rgba(232, 245, 233, 0.8);
    backdrop-filter: blur(5px);
    border: 2px solid var(--primary-sage);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .detected-prompts-box {
    background: rgba(30, 41, 33, 0.7);
    border-color: var(--primary-moss);
}

/* Input Container with Line Numbers */
.input-container {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.dark-mode .input-container {
    background: #1e1e1e;
    border-color: #444;
}

.input-line-nums {
    background: #e9ecef;
    color: #6c757d;
    padding: 10px 8px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    text-align: right;
    user-select: none;
    min-width: 40px;
    overflow: hidden;
    white-space: pre;
    border-right: 2px solid #dee2e6;
}

body.dark-mode .input-line-nums {
    background: #252525;
    color: #6e7681;
    border-right-color: #444;
}

.input-editor {
    flex: 1;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    background: transparent;
    border: none;
    outline: none;
    resize: vertical;
    min-height: 100px;
    color: #212529;
}

body.dark-mode .input-editor {
    color: #e0e0e0;
}

.input-editor::placeholder {
    color: #6c757d;
    font-style: italic;
}

body.dark-mode .input-editor::placeholder {
    color: #6e7681;
}

/* Input Hints Overlay */
.input-hints {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    color: #9ca3af;
    pointer-events: none;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
}

body.dark-mode .input-hints {
    color: #6e7681;
}

.input-hint-line {
    min-height: 20px;
}

.code-editor-container h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* Code Editor */
.code-editor-wrapper {
    display: flex;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
}

.line-nums {
    background: #252525;
    color: #6e7681;
    padding: 10px 8px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    text-align: right;
    user-select: none;
    width: 45px;
    overflow: hidden;
    white-space: pre;
}

.code-editor {
    flex: 1;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    background: #1e1e1e;
    border: none;
    color: #d4d4d4;
    caret-color: #528bff;
    resize: vertical;
    min-height: 400px;
    outline: none;
}

.code-editor::placeholder {
    color: #5c5c5c;
}

.output-container {
    background: #282c34;
    color: #ff0000;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-family: 'Courier New', Courier, monospace;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
}

.output-container pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-error {
    color: #f48771;
}

.output-success {
    color: #89d185;
}

/* Activity Details */
.activity-details {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: 20px;
}

body.dark-mode .activity-details {
    background: rgba(30, 41, 33, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
}

.activity-details h2 {
    color: var(--text-primary);
    font-size: 1.8em;
    margin-bottom: 15px;
}

.activity-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.activity-description {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Table Styles */
.data-table {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, var(--btn-primary) 0%, var(--btn-primary-hover) 100%);
    color: var(--text-on-primary);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--primary-sage);
    background-opacity: 0.1;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Filter Section */
.filter-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

body.dark-mode .filter-section {
    background: rgba(30, 41, 33, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95em;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--input-focus);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--shadow);
}

body.dark-mode .filter-group select,
body.dark-mode .filter-group input {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: #ffffff;
}

body.dark-mode .filter-group select:focus,
body.dark-mode .filter-group input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--input-focus);
}

.filter-group select option {
    background: #2c3e50;
    color: #fff;
}

body.dark-mode .filter-group select option {
    background: #1e2921;
    color: #fff;
}

/* Loading Spinner */
.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    z-index: 1001;
    gap: 4px;
}

.burger-menu:hover {
    background: rgba(255, 255, 255, 0.3);
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    display: block;
    transition: 0.3s;
    border-radius: 3px;
}

/* Responsive Design */
/* Ensure nav-menu is always visible on desktop */
@media (min-width: 769px) {
    .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .burger-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .nav-container {
        padding: 10px 15px;
    }

    .nav-brand h2 {
        font-size: 1.1em;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
        flex-direction: column;
        padding: 20px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 999;
        overflow-y: auto;
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu .nav-link {
        margin: 8px 0;
        padding: 15px 20px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.15);
        text-align: center;
        font-size: 1em;
        width: 100%;
        display: block;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(255, 255, 255, 0.3);
    }

    .main-content {
        padding: 15px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }

    .notifications-panel {
        width: 100%;
        right: -100%;
    }

    .login-wrapper, .signup-wrapper {
        padding: 20px;
    }

    /* Code Editor Responsive */
    .code-editor-wrapper {
        flex-direction: column;
    }

    .line-numbers {
        display: none;
    }

    .code-highlighting {
        left: 0;
    }

    .code-editor, .code-highlighting {
        font-size: 14px;
        padding: 10px;
    }

    .code-highlighting {
        padding-top: 8px;
    }

    .activity-details h2 {
        font-size: 1.4em;
    }

    .data-table {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .nav-brand h2 {
        font-size: 0.9em;
    }

    .nav-menu {
        width: 100%;
        right: -100%;
    }

    .burger-menu span {
        width: 22px;
        height: 2px;
    }

    .main-content {
        padding: 10px;
    }

    .dashboard-header,
    .activity-details,
    .stat-card,
    .subject-card {
        padding: 15px;
    }

    .stats-grid,
    .subjects-grid {
        gap: 15px;
    }

    .code-editor, .code-highlighting {
        font-size: 12px;
        padding: 8px;
    }

    .code-highlighting {
        padding-top: 6px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .activity-details h2 {
        font-size: 1.2em;
    }

    .welcome-section h1 {
        font-size: 1.5em;
    }

    .stat-value {
        font-size: 1.8em;
    }
}

/* File Upload Styling */
input[type="file"] {
    padding: 12px;
    border: 2px dashed var(--primary-hunter);
    border-radius: 8px;
    background: var(--bg-light);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
}

input[type="file"]:hover {
    background: var(--primary-sage);
    background-opacity: 0.1;
    border-color: var(--primary-medium);
}

input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: var(--primary-hunter);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 12px;
    transition: all 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-medium);
    transform: translateY(-2px);
}

/* Activity Filter Dropdown */
.filter-activity {
    position: relative;
    margin-bottom: 20px;
}

.filter-activity label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.filter-activity select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23355E3B' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.filter-activity select:hover {
    border-color: var(--primary-hunter);
}

.filter-activity select:focus {
    outline: none;
    border-color: var(--primary-hunter);
    box-shadow: 0 0 0 3px rgba(53, 94, 59, 0.15);
}

/* Grade Submission Form */
.grade-form-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 16px var(--shadow);
    margin-top: 20px;
}

body.dark-mode .grade-form-container {
    background: rgba(30, 41, 33, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
}

.grade-form-container h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grade-form-container .form-group {
    margin-bottom: 20px;
}

.grade-form-container label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.grade-form-container input[type="number"],
.grade-form-container input[type="text"],
.grade-form-container textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s;
}

.grade-form-container input[type="number"]:focus,
.grade-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-hunter);
    box-shadow: 0 0 0 3px rgba(53, 94, 59, 0.15);
}

.grade-form-container textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.grade-form-container input[type="number"] {
    max-width: 150px;
}

.grade-form-container .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* Score Input Styling */
input[type="number"].score-input {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-hunter);
    text-align: center;
}

input[type="number"].score-input::-webkit-inner-spin-button,
input[type="number"].score-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 40px;
}

/* Feedback Textarea Styling */
textarea.feedback-input {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
}

textarea.feedback-input:focus {
    background: var(--bg-card);
    border-color: var(--primary-hunter);
}

/* Form Helper Text */
.form-helper {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-top: 6px;
    font-style: italic;
}

/* Upload Preview */
.upload-preview {
    margin-top: 15px;
    padding: 15px;
    background: var(--primary-sage);
    background-opacity: 0.1;
    border-radius: 8px;
    border-left: 4px solid var(--primary-hunter);
}

.upload-preview p {
    color: var(--text-primary);
    margin: 0;
    font-size: 0.9em;
}

.upload-preview strong {
    color: var(--primary-hunter);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-hunter);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-medium);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--btn-primary) 0%, var(--btn-primary-hover) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 20px var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    transition: all 0.3s ease;
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.dark-mode-toggle .icon {
    transition: transform 0.3s ease;
}

body.dark-mode .dark-mode-toggle .sun-icon {
    display: inline;
}

body.dark-mode .dark-mode-toggle .moon-icon {
    display: none;
}

body:not(.dark-mode) .dark-mode-toggle .sun-icon {
    display: none;
}

body:not(.dark-mode) .dark-mode-toggle .moon-icon {
    display: inline;
}

/* Theme Selector Popup */
.theme-selector-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 40px var(--shadow-hover);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    min-width: 200px;
}

.theme-selector-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-selector-popup h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-option:hover {
    background: var(--bg-light);
    transform: translateX(3px);
}

.theme-option.active {
    border-color: var(--accent-color);
    background: var(--bg-light);
}

.theme-color-preview {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
}

.theme-option span {
    color: var(--text-primary);
    font-size: 0.9em;
}

/* Theme color previews */
.theme-color-preview.green {
    background: linear-gradient(135deg, #014421, #355E3B);
}

.theme-color-preview.pink {
    background: linear-gradient(135deg, #B8336A, #E91E63);
}

.theme-color-preview.blue {
    background: linear-gradient(135deg, #00BFFF, #1E3A8A);
}

.theme-color-preview.red {
    background: linear-gradient(135deg, #A00000, #4B0000);
}

/* Dark mode color previews */
body.dark-mode .theme-color-preview.green {
    background: linear-gradient(135deg, #0a1f14, #1a3326);
}

body.dark-mode .theme-color-preview.pink {
    background: linear-gradient(135deg, #4B1942, #73264D);
}

body.dark-mode .theme-color-preview.blue {
    background: linear-gradient(135deg, #0A2540, #1E3A5F);
}

body.dark-mode .theme-color-preview.red {
    background: linear-gradient(135deg, #4B0000, #2B0000);
}

/* Mobile - Long press indicator */
@media (max-width: 768px) {
    .dark-mode-toggle::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 3px solid transparent;
        transition: all 0.3s ease;
    }

    .dark-mode-toggle.long-pressing::after {
        border-color: var(--accent-color);
        transform: scale(1.1);
        animation: pulse 0.5s ease infinite;
    }

    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.6; }
    }
}

/* Dark Mode Text Overrides - Make all colored text white */
body.dark-mode .login-header h1,
body.dark-mode .signup-header h1,
body.dark-mode .tab-btn,
body.dark-mode .signup-link a,
body.dark-mode .login-link a,
body.dark-mode .enrollment-section label,
body.dark-mode .stat-value,
body.dark-mode .view-all-link,
body.dark-mode .empty-message a,
body.dark-mode .notif-link,
body.dark-mode .upload-preview strong,
body.dark-mode .score-input {
    color: #ffffff !important;
}

body.dark-mode .tab-btn {
    border-color: var(--primary-moss);
}

body.dark-mode .tab-btn:hover {
    background: rgba(138, 154, 91, 0.2);
}

body.dark-mode .stat-value {
    color: var(--primary-sage) !important;
}

/* Dark Mode - Disabled Input Fields */
body.dark-mode input[disabled],
body.dark-mode input:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode small {
    color: #e0e0e0 !important;
}

/* Interactive Pet Styles - All Themes */
.interactive-pet {
    position: fixed;
    width: 80px;
    height: 80px;
    z-index: 999;
    cursor: grab;
    user-select: none;
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.interactive-pet.dragging {
    cursor: grabbing;
}

.pet-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.pet-sprite {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.pet-shadow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 8px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3), transparent);
    border-radius: 50%;
}

/* Walking animation */
.interactive-pet.walking .pet-sprite {
    animation: frogWalk 0.4s ease-in-out infinite;
}

@keyframes frogWalk {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Idle animations */
.interactive-pet.bounce .pet-sprite {
    animation: frogBounce 0.6s ease;
}

@keyframes frogBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.interactive-pet.blink .pet-sprite {
    animation: frogBlink 0.5s ease;
}

@keyframes frogBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Jump reaction */
.interactive-pet.jump .pet-sprite {
    animation: frogJump 0.6s ease;
}

@keyframes frogJump {
    0%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-35px) scale(1.1, 0.9); }
    60% { transform: translateY(-40px) scale(0.9, 1.1); }
}

/* Pet Speech Bubble - Pixelated Square */
.pet-speech-bubble {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #333;
    padding: 15px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    border: 3px solid #333;
}

.pet-speech-bubble::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: white;
    border: 3px solid #333;
    margin-top: -4px;
}

.pet-speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 45%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: white;
    border: 3px solid #333;
    margin-top: 3px;
}

.pet-speech-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
    animation: bubbleBounce 0.5s ease;
}

@keyframes bubbleBounce {
    0% { transform: translateX(-50%) translateY(-20px) scale(0.8); opacity: 0; }
    50% { transform: translateX(-50%) translateY(-2px) scale(1.05); }
    100% { transform: translateX(-50%) translateY(-5px) scale(1); opacity: 1; }
}

/* Pet control button */
.pet-control-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-hover));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 20px var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    transition: all 0.3s ease;
    z-index: 999;
}

.pet-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

/* Mini Game Button (Console Controller) */
.mini-game-toggle {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-hover));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 20px var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
    animation: gameButtonPulse 2s ease-in-out infinite;
}

.mini-game-toggle:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 30px var(--shadow-hover);
    animation: none;
}

.mini-game-toggle:active {
    transform: scale(0.95);
}

@keyframes gameButtonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 20px var(--shadow-hover);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px var(--shadow-hover);
    }
}
