/* Math Learning App Styles */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    min-height: 100vh;
    padding-bottom: 50px; /* Space for debug panel */
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Dark Mode */
.dark-mode {
    background-color: #1a1a2e;
    color: #ffffff;
}

.dark-mode .navbar {
    background-color: #1a1a2e !important;
    border-bottom: 1px solid #0f3460;
}

.dark-mode .navbar-brand,
.dark-mode .nav-link {
    color: #f0f0f0 !important;
}

.dark-mode .card {
    background-color: #1a1a2e;
    border-color: #0f3460;
}

.dark-mode .card-header {
    background-color: #0f3460;
    border-color: #0f3460;
    color: #f0f0f0;
}

/* Selection Buttons */
.grade-btn,
.type-btn,
.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.grade-btn {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 18px;
}

.grade-btn:hover,
.type-btn:hover,
.mode-btn:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
    border-color: #adb5bd;
}

.grade-btn.active,
.type-btn.active,
.mode-btn.active {
    background-color: #0056b3;
    border-color: #004085;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dark-mode .grade-btn,
.dark-mode .type-btn,
.dark-mode .mode-btn {
    background-color: #0f3460;
    color: #f0f0f0;
}

.dark-mode .grade-btn:hover,
.dark-mode .type-btn:hover,
.dark-mode .mode-btn:hover {
    background-color: #16213e;
}

.dark-mode .grade-btn.active,
.dark-mode .type-btn.active,
.dark-mode .mode-btn.active {
    background-color: #6c5ce7;
    color: white;
}

/* Start Button */
#startPracticeBtn {
    padding: 12px 35px;
    font-size: 18px;
    margin-top: 20px;
    transition: all 0.3s;
    background-color: #0056b3;
    border-color: #004085;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#startPracticeBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #003d80;
    border-color: #00285a;
}

.dark-mode #startPracticeBtn {
    background-color: #6c5ce7;
    border-color: #6c5ce7;
}

/* Goal Input */
#goalInput {
    border: 1px solid #ced4da;
    font-weight: 500;
    color: #495057;
    width: 80px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
}

/* Input Fields */
input.form-control {
    text-align: center;
}

/* Grade Grid */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Make grid responsive - 3x2 on smaller screens */
@media (max-width: 768px) {
    .grade-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        max-width: 300px;
    }
}

/* Navbar Goal Input */
#goalInput.transparent-input {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: white;
    text-align: center;
    font-weight: 500;
    width: 80px;
}

#goalInput.transparent-input:focus {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Navbar Elements */
.transparent-input {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    text-align: center;
    width: 150px;
    transition: all 0.3s;
    font-weight: 500;
}

.transparent-input::placeholder {
    color: rgba(255, 255, 255, 0.9);
}

.transparent-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.4);
}

.nav-btn {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    font-weight: 500;
}

/* Navbar styling */
.navbar {
    background-color: #0056b3 !important;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    color: white !important;
    font-weight: 600;
}

/* Goal container */
.goal-container {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Responsive navbar */
@media (max-width: 991px) {
    .navbar .container-fluid {
        position: relative;
        padding: 10px;
    }
    
    .goal-container {
        position: relative;
        left: auto;
        transform: none;
        margin: 10px auto;
    }
}

.dark-mode .navbar {
    background-color: #0f3460 !important;
}

.dark-mode .transparent-input {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.dark-mode .transparent-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Button styling */
.btn-primary {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-primary:hover {
    background-color: #003d80;
    border-color: #00285a;
}

.btn-outline-primary {
    border-color: white;
    color: white;
    border-width: 2px;
}

.btn-outline-primary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: white;
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.dark-mode .debug-panel {
    background-color: #1a1a2e;
    border-top: 1px solid #0f3460;
    color: #f0f0f0;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.dark-mode .debug-header {
    background-color: #0f3460;
    border-bottom: 1px solid #16213e;
}

.resize-handle {
    height: 5px;
    background-color: #dee2e6;
    cursor: ns-resize;
    width: 100%;
}

.dark-mode .resize-handle {
    background-color: #16213e;
}

.resize-handle:hover {
    background-color: #adb5bd;
}

.dark-mode .resize-handle:hover {
    background-color: #6c5ce7;
}

.debug-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    font-family: monospace;
    font-size: 14px;
}

.debug-content pre {
    margin: 0;
    white-space: pre-wrap;
}

.debug-property {
    margin-bottom: 5px;
    display: flex;
}

.debug-property .key {
    font-weight: bold;
    margin-right: 10px;
    min-width: 120px;
}

.debug-property .value {
    color: #0d6efd;
}

.dark-mode .debug-property .value {
    color: #6c5ce7;
}
