/* Analysis Page Specific Styles */

:root {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --text-color: #333;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

body.dark-theme {
    --text-color: #f0f0f0;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    transition: background 0.5s ease;
}

.analysis-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    color: var(--text-color);
}

.title {
    font-family: 'Funnel Display', sans-serif;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3rem;
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 60px;
    opacity: 0.8;
    font-weight: 300;
}

.module {
    margin-bottom: 80px;
    background: var(--glass-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.module:hover {
    transform: translateY(-5px);
}

.module-header {
    text-align: center;
    margin-bottom: 30px;
}

.module-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.math-display {
    font-size: 1.3rem;
    margin: 20px 0;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: inline-block;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

body.dark-theme .math-display {
    background: rgba(0, 0, 0, 0.2);
}

.canvas-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

canvas {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
    max-width: 100%;
    transition: box-shadow 0.3s;
}

canvas:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments for canvas */
body.dark-theme canvas {
    filter: invert(1) hue-rotate(180deg);
}

.controls {
    flex: 1;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.4);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

body.dark-theme .controls {
    background: rgba(0, 0, 0, 0.2);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Custom Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    outline: none;
}

body.dark-theme input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity 0.3s, transform 0.2s;
    width: 100%;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.explanation {
    margin-top: 30px;
    line-height: 1.7;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-left: 5px solid var(--primary-color);
    border-radius: 0 10px 10px 0;
}

.divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
    margin: 60px 0;
}

body.dark-theme .divider {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.status-indicator {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}

.status-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.status-fail {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-group label {
    font-weight: normal;
    cursor: pointer;
}

/* Stats Display */
.stats-display {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
}

body.dark-theme .stats-display {
    background: rgba(255, 255, 255, 0.05);
}

select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
}