/*
 * Copyright (c) 2024-2025, Nwennje. All rights reserved.
 * Licensed under the MIT License.
 * Contact: mercuryroc@gmail.com
 */

:root {
    /* Color Palette - Dark/Neon Theme */
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.1);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: blur(12px);

    /* Fonts */
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.logo-icon {
    font-size: 2rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-links li {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Hardware acceleration */
}

.nav-links li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.nav-links li:hover {
    background: var(--glass-bg);
    color: var(--text-main);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-links li:hover::before {
    left: 100%;
}

.nav-links li.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateX(0);
}

.nav-links li .icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    height: 100%;
}

.top-bar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: var(--glass-border);
}

.top-bar h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

.module-container {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

.module-view {
    display: none;
    height: 100%;
    animation: fadeInScale 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.module-view.active {
    display: block;
}

/* Enhanced Action Button Styles */
.action-btn {
    background: var(--gradient-main);
    color: white;
    padding: 0 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.action-btn:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-3px);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px var(--primary-glow);
    transition: all 0.1s ease;
}

/* Enhanced Option Button Styles */
.option-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: translateY(-2px);
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:active {
    transform: translateY(0);
}

.option-btn.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Enhanced Tab Button Styles */
.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Enhanced Navigation Link Styles */
.nav-links li {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-links li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.nav-links li:hover {
    background: var(--glass-bg);
    color: var(--text-main);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-links li:hover::before {
    left: 100%;
}

.nav-links li.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateX(0);
}

/* Module Transition Enhancement */
.module-view {
    display: none;
    height: 100%;
    animation: fadeInScale 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.module-view.active {
    display: block;
}

/* Glass Panel Enhancement */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: all 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Common UI Elements */
button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

/* Calculator Module Styles */
.calculator-wrapper {
    max-width: 400px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.display-container {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: right;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.history-display {
    height: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-display {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    text-align: right;
    padding: 0;
    font-family: var(--font-mono);
}

.main-display:focus {
    box-shadow: none;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.calc-btn {
    aspect-ratio: 1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateZ(0); /* Hardware acceleration */
    cursor: pointer;
    border: none;
    outline: none;
}

.calc-btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.calc-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.calc-btn:hover::before {
    left: 100%;
}

.calc-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-muted) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    filter: grayscale(50%) !important;
}

.calc-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    filter: grayscale(50%) !important;
}

.calc-btn:disabled:focus {
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2) !important;
}

.calc-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.calc-btn:not(:disabled) {
    cursor: pointer;
}

/* Ripple effect for buttons */
.calc-btn:not(:disabled)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.calc-btn:not(:disabled):active::after {
    width: 300px;
    height: 300px;
}
.calc-btn.operator {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.calc-btn.func,
.calc-btn.constant {
    color: var(--accent);
    font-size: 0.9rem;
}

.calc-btn.btn-clear {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.calc-btn.btn-equal {
    background: var(--gradient-main);
    color: white;
    grid-column: span 2;
    aspect-ratio: auto;
}

.calc-btn.btn-zero {
    grid-column: span 2;
    aspect-ratio: auto;
}

/* Algebra Module Styles */
.algebra-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.algebra-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-with-btn {
    display: flex;
    gap: 1rem;
}

.input-with-btn input {
    flex: 1;
}

.action-btn {
    background: var(--gradient-main);
    color: white;
    padding: 0 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.action-btn:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-3px);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px var(--primary-glow);
    transition: all 0.1s ease;
}
.options-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.option-btn.active {
    background: var(--primary);
    color: white;
}

.result-area {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 1rem;
    min-height: 100px;
}

.result-box {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    word-break: break-all;
}

.success-result {
    color: #4ade80;
}

.error-result {
    color: #ef4444;
}

/* Graphing Module Styles */
.graphing-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.graphing-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plot-area {
    flex: 1;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    min-height: 400px;
    width: 100%;
}

/* Geometry Module Styles */
.geometry-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.geometry-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shape-selector {
    margin-bottom: 1.5rem;
}

.geo-results {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-item {
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-main);
    font-family: var(--font-mono);
}

/* Calculus Module Styles */
.calculus-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.calculus-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calc-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.5rem;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Statistics Module Styles */
.stats-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.stats-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats-results {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Matrix Module Styles */
.matrix-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.matrix-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.matrix-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.matrix-setup {
    flex: 1;
    min-width: 250px;
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem;
    border-radius: 12px;
}

.matrix-setup h4 {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.dims-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.dims-inputs input {
    width: 60px;
    padding: 0.25rem 0.5rem;
}

.sm-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sm-btn:hover {
    background: var(--primary);
}

.matrix-grid-container {
    display: grid;
    gap: 0.5rem;
}

.mat-cell {
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.matrix-actions {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.op-btn {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.op-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.matrix-result-box {
    line-height: 1.6;
    font-size: 1.2rem;
}

/* Unit Converter Styles */
.converter-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.converter-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.converter-controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-selector label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.conversion-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.input-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.swap-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 1.5rem;
}

.result-display {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    min-height: 46px;
    display: flex;
    align-items: center;
}

[data-theme="light"] .result-display {
    background: rgba(255, 255, 255, 0.8);
}

/* Finance Module Styles */
.finance-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.finance-wrapper h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.finance-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.finance-result {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    margin-top: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.result-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-row span {
    color: var(--text-muted);
}

.result-row .val {
    color: var(--text-main);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

[data-theme="light"] .finance-result {
    background: rgba(255, 255, 255, 0.6);
}

/* Voice Control Styles */
.voice-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6);
}

.voice-fab.listening {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--primary);
}

/* Graphing Styles */
.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.toggle-group {
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.mode-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mode-btn.active {
    background: var(--primary);
    color: white;
}

.mode-btn:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --bg-panel: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.4);
}

[data-theme="light"] .calc-btn {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .calc-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .display-container {
    background: rgba(255, 255, 255, 0.5);
}


[data-theme="light"] .result-area,
[data-theme="light"] .matrix-setup,
[data-theme="light"] .mat-cell,
[data-theme="light"] .calc-tabs,
[data-theme="light"] .plot-area,
[data-theme="light"] .result-item,
[data-theme="light"] .stat-item {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.finance-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.finance-result {
    background: rgba(15, 23, 42, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    margin-top: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.result-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-row span {
    color: var(--text-muted);
}

.result-row .val {
    color: var(--text-main);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

[data-theme="light"] .finance-result {
    background: rgba(255, 255, 255, 0.6);
}

/* Voice Control Styles */
.voice-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6);
}

.voice-fab.listening {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--primary);
}

/* Graphing Styles */
.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.toggle-group {
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.mode-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mode-btn.active {
    background: var(--primary);
    color: white;
}

.mode-btn:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --bg-panel: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.4);
}

[data-theme="light"] .calc-btn {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .calc-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .display-container {
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .result-area,
[data-theme="light"] .matrix-setup,
[data-theme="light"] .mat-cell,
[data-theme="light"] .calc-tabs,
[data-theme="light"] .plot-area,
[data-theme="light"] .result-item,
[data-theme="light"] .stat-item {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .toggle-group {
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .mode-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

.settings-group {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

/* Algebraic Keyboard Styles */
.keyboard-toggle {
    margin-bottom: 1.5rem;
}

.toggle-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toggle-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.toggle-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

.algebraic-keyboard {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.keyboard-section {
    margin-bottom: 1.5rem;
}

.keyboard-section:last-child {
    margin-bottom: 0;
}

.keyboard-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.keyboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alg-btn {
    min-width: 70px;
    min-height: 70px;
    padding: 1rem 1.25rem;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alg-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.alg-btn:active {
    transform: translateY(0);
}

.alg-btn.btn-clear {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.alg-btn.btn-clear:hover {
    background: rgba(239, 68, 68, 0.3);
}

.options-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.option-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-main);
}

.option-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

[data-theme="light"] .algebraic-keyboard {
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .alg-btn {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .alg-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* AI Explanation Styles */
.explanation-box {
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.explanation-content {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 0.95rem;
}

.loading {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.icon-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

[data-theme="light"] .explanation-box {
    background: rgba(59, 130, 246, 0.05);
}

[data-theme="light"] .icon-btn {
    background: rgba(59, 130, 246, 0.1);
}


/* Bug Report Button */
.bug-report-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.bug-report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 1);
}

.bug-report-btn:active {
    transform: translateY(-1px);
}

[data-theme="light"] .bug-report-btn {
    background: rgba(220, 38, 38, 0.9);
}

[data-theme="light"] .bug-report-btn:hover {
    background: rgba(220, 38, 38, 1);
}

/* Developer Panel Styles */
.dev-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border-left: var(--glass-border);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.dev-panel-header {
    padding: 1.5rem;
    background: var(--gradient-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.dev-panel-header h3 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
}

.dev-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.dev-section {
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.dev-section h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    font-size: 1rem;
}

.status-grid,
.info-grid {
    display: grid;
    gap: 0.75rem;
}

.status-item,
.info-item,
.storage-item,
.perf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.status-label,
.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-value,
.info-value {
    color: var(--text-main);
    font-weight: 600;
}

.info-input {
    flex: 1;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.85rem;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.dev-btn {
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dev-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.debug-console {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.console-log {
    color: #4ade80;
    margin-bottom: 0.25rem;
}

.storage-info,
.perf-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dev-panel {
        width: 100%;
    }
}

/* App Footer - Copyright */
.app-footer {
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
}

.app-footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

[data-theme="light"] .app-footer {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive footer */
@media (max-width: 768px) {
    .app-footer {
        padding: 0.75rem 1rem;
    }

    .app-footer p {
        font-size: 0.75rem;
    }
}

/* ============================================
   Bug Report Module Styles
   ============================================ */

/* Voice FAB button (Mic) - positioned at bottom */
.voice-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 20px var(--primary-glow), 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-fab:hover {
    transform: scale(1.1) translateY(-2px);
}

.voice-fab.listening {
    background: linear-gradient(135deg, #ef4444, #f97316);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
    }

    50% {
        box-shadow: 0 4px 30px rgba(239, 68, 68, 0.8);
    }
}

/* Floating Bug Report Button - positioned above mic */
.bug-report-floating-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 20px var(--primary-glow), 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bug-report-floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 30px var(--primary-glow), 0 12px 40px rgba(0, 0, 0, 0.4);
}

.bug-report-floating-btn:active {
    transform: scale(0.95);
}

/* Floating Feedback Button - positioned above bug report */
.feedback-floating-btn {
    position: fixed;
    bottom: 176px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4), 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5), 0 12px 40px rgba(0, 0, 0, 0.4);
}

.feedback-floating-btn:active {
    transform: scale(0.95);
}

/* Bug Report Modal */
.bug-report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bug-report-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.bug-report-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bug-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.bug-report-header h3 {
    margin: 0;
    font-size: 1.25rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bug-report-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bug-report-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.bug-report-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bug-report-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.category-btn.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.cat-icon {
    font-size: 1.5rem;
}

.cat-label {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Priority Selector */
.priority-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.priority-btn {
    flex: 1;
    min-width: 70px;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.priority-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.priority-btn.selected {
    color: white;
}

.priority-btn[data-priority="low"].selected {
    background: #22c55e;
    border-color: #22c55e;
}

.priority-btn[data-priority="medium"].selected {
    background: #f59e0b;
    border-color: #f59e0b;
}

.priority-btn[data-priority="high"].selected {
    background: #f97316;
    border-color: #f97316;
}

.priority-btn[data-priority="critical"].selected {
    background: #ef4444;
    border-color: #ef4444;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Bug Report Footer */
.bug-report-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 4px 20px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Success Message */
.bug-report-success {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.success-content {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.success-content h4 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: #4ade80;
}

.success-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Reports View */
.bug-report-view {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.reports-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.reports-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

.no-reports {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-reports-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.report-item {
    position: relative;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.report-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.report-category {
    font-size: 1.25rem;
}

.report-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-main);
}

.report-priority {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.report-priority.low {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.report-priority.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.report-priority.high {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.report-priority.critical {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.report-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.report-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding-right: 2rem;
}

.delete-report-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.delete-report-btn:hover {
    opacity: 1;
}

.reports-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Toast Notification */
.bug-report-toast {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 500;
    z-index: 10002;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.bug-report-toast.error {
    border-left: 4px solid #ef4444;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Enhanced Animations */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    
    50% {
        opacity: 0.7;
        transform: scale(1.02) translateY(-5px);
    }
    
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    
    70% {
        opacity: 1;
        transform: scale(1.05);
    }
    
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    
    50% {
        transform: translateY(-10px);
    }
    
    100% {
        transform: translateY(0px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    
    100% {
        background-position: 200% 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    
    50% {
        transform: scale(1.05);
    }
    
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes loadingSpin {
    0% {
        transform: rotate(0deg);
    }
    
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    
    50% {
        background-position: 100% 50%;
    }
    
    100% {
        background-position: 0% 50%;
    }
}

/* Loading Animation Element */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: loadingSpin 1s ease-in-out infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.memory-indicator {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    animation: pulseGlow 2s infinite;
}

.memory-indicator.active {
    display: block !important;
}

.stats-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 300px;
    z-index: 10000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-content {
    display: grid;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--text-main);
    font-weight: 600;
}

/* Enhanced Loading Animation */
.loading-container {
    text-align: center;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.enhanced-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 1.5rem;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.5s infinite ease-in-out;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-dot:nth-child(3) { animation-delay: 0s; }
.spinner-dot:nth-child(4) { animation-delay: 0.16s; }

.loading-message {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.loading-progress {
    width: 200px;
    margin: 0 auto;
}

.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Trigonometry Module Styles */
.trigonometry-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.trig-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.angle-mode-selector, .function-selector {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.angle-mode-selector label, .function-selector label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.trig-btn {
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.trig-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.trig-btn.primary {
    color: var(--primary);
}

.trig-btn.inverse {
    color: var(--accent);
}

.trig-btn.reciprocal {
    color: #f59e0b;
}

.trig-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
}

.current-formula {
    margin-bottom: 1rem;
}

#unit-circle-canvas {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Physics Module Styles */
.physics-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.physics-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: var(--gradient-main);
    color: white;
}

.physics-tab-content {
    display: none;
}

.physics-tab-content.active {
    display: block;
}

.physics-calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1rem;
}

.input-section {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
}

.equation-input {
    margin-bottom: 1.5rem;
}

.equation-input input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
}

.variable-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.var-name, .var-value, .var-unit {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
}

.var-name, .var-value {
    flex: 1;
}

.add-btn, .remove-btn {
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.remove-btn {
    background: #ef4444;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-buttons button {
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-buttons button:hover {
    background: rgba(59, 130, 246, 0.3);
}

.constants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.constant-card {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.constant-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.constant-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.constant-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.constant-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.insert-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.formulas-list {
    display: grid;
    gap: 1.5rem;
}

.formula-card {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.formula-expression {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0.5rem 0;
    text-align: center;
}

.formula-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.solve-btn {
    padding: 0.5rem 1rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.converter-section {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.conversion-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.conversion-input input, .conversion-input select {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
}

.conversion-input input {
    flex: 1;
}

/* Chemistry Module Styles */
.chemistry-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.periodic-table-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    margin-top: 1rem;
}

.periodic-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.periodic-cell:hover {
    transform: scale(1.1);
    z-index: 10;
}

.periodic-cell:hover .element-details {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 100;
    min-width: 200px;
}

.atomic-number {
    font-size: 0.6rem;
    position: absolute;
    top: 2px;
    left: 2px;
}

.symbol {
    font-weight: bold;
    font-size: 1rem;
}

.atomic-mass {
    font-size: 0.6rem;
}

.periodic-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.periodic-cell.empty:hover {
    transform: none;
}

/* Element Categories */
.periodic-cell.alkali-metal { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.periodic-cell.alkaline-earth { background: linear-gradient(135deg, #ffd93d, #f8c744); }
.periodic-cell.transition-metal { background: linear-gradient(135deg, #74c0fc, #4dabf7); }
.periodic-cell.post-transition { background: linear-gradient(135deg, #ff922b, #fd7e14); }
.periodic-cell.metalloid { background: linear-gradient(135deg, #cc5de8, #be4bdb); }
.periodic-cell.nonmetal { background: linear-gradient(135deg, #40c057, #37b24d); }
.periodic-cell.halogen { background: linear-gradient(135deg, #f783ac, #f06595); }
.periodic-cell.noble-gas { background: linear-gradient(135deg, #ced4da, #adb5bd); }

.legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.legend-item {
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-align: center;
    color: white;
}

.molecular-calculator {
    padding: 1rem;
}

.molecular-input {
    margin-bottom: 1.5rem;
}

.molecular-input input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.composition-list {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
}

.composition-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.element {
    font-weight: bold;
    color: var(--primary);
}

.mass-percent {
    color: var(--accent);
}

/* Modal Styles for All Modules */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--bg-main);
    border-radius: 16px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

.close-modal {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

/* Formulas Modal */
.formulas-modal-list {
    display: grid;
    gap: 1.5rem;
}

.formula-modal-card {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-converter-grid {
    display: grid;
    gap: 2rem;
}

.converter-modal-section {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.constants-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.constants-table th, .constants-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.constants-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.insert-btn {
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Math Concepts Module Styles */
.math-concepts-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.concepts-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.topic-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.topic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.topic-btn.active {
    background: var(--gradient-main);
    color: white;
}

.topic-content {
    display: none;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.topic-content.active {
    display: block;
}

.practice-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
}

.problem-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.problem-filters select {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    flex: 1;
    min-width: 150px;
}

.problem-card {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.problem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.difficulty-tag {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty-tag.easy { background: #10b981; color: white; }
.difficulty-tag.medium { background: #f59e0b; color: white; }
.difficulty-tag.hard { background: #ef4444; color: white; }

.show-solution-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Tutorials Module Styles */
.tutorials-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.category-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--gradient-main);
    color: white;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tutorial-card {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tutorial-header h3 {
    margin: 0;
    color: var(--primary);
}

.difficulty-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty-badge.easy { background: #10b981; color: white; }
.difficulty-badge.medium { background: #f59e0b; color: white; }
.difficulty-badge.hard { background: #ef4444; color: white; }

.tutorial-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tutorial-preview {
    margin-bottom: 1rem;
}

.start-tutorial-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.tutorial-display {
    padding: 1rem;
}

.back-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.tutorial-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.prev-btn, .next-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Help & Support Module Styles */
.help-support-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.help-search {
    display: flex;
    margin-bottom: 1rem;
}

.help-search input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 0 0 8px;
    color: var(--text-main);
}

.help-search button {
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

.help-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.help-articles, .support-resources {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-card {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-title {
    color: var(--primary);
    cursor: pointer;
    margin: 0;
}

.article-title:hover {
    text-decoration: underline;
}

.resources-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.resource-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.resource-icon {
    font-size: 1.5rem;
}

.resource-content {
    flex: 1;
}

.resource-btn {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.quick-links ul {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: var(--primary);
    text-decoration: none;
}

.quick-links a:hover {
    text-decoration: underline;
}

.support-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.support-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Quiz Styles */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-question {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    cursor: pointer;
}

.quiz-option input {
    margin: 0;
}

.check-answer-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
}

.answer-feedback {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.submit-quiz-btn {
    padding: 0.75rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
    width: 100%;
}

/* Tips and Tutorials */
.tips-container {
    display: grid;
    gap: 1rem;
}

.tip-card {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.thumbnail-placeholder {
    width: 120px;
    height: 70px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 0.7rem;
}

.video-info {
    flex: 1;
}

.play-video-btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* FAQ Styles */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item h4 {
    color: var(--primary);
    margin-top: 0;
}

/* Feedback Form */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
}

.submit-feedback-btn {
    padding: 0.75rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
}

/* System Info */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}
.enhanced-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0); /* Hardware acceleration */
}

.enhanced-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.6s;
}

.enhanced-btn:hover::before {
    left: 100%;
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* New Smooth Animation Classes */
.smooth-fade-in {
    animation: fadeInSlideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-left {
    animation: slideInFromLeft 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.pop-in {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.smooth-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0);
}

.smooth-hover:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Engineering Module Styles */
.engineering-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.engineering-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.flex-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.flex-row > input,
.flex-row > select {
    flex: 1;
    min-width: 150px;
}

.result-box {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
}

.result-box span:first-child {
    color: var(--text-muted);
}

.result-box span:last-child {
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-mono);
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-group label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.radio-group input[type="radio"] {
    margin: 0;
}

.action-btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Responsive Bug Report */@media (max-width: 768px) {
    .bug-report-floating-btn {
        bottom: 80px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .feedback-floating-btn {
        bottom: 140px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .bug-report-container {
        max-height: 85vh;
        padding: 1.25rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bug-report-footer {
        flex-direction: column;
    }

    .reports-footer {
        flex-direction: column;
    }
}