/* 
    Design System - Guia de Estudos
    Premium, Modern, and Responsive CSS
*/

:root {
    --primary: #0e4194;
    --primary-dark: #0a2e69;
    --secondary: #e8490f;
    --bg-gray: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-gray);
    color: var(--text-main);
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 4rem;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: bold;
    font-style: italic;
}

.logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.025em;
}

/* Main Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .layout-grid {
        grid-template-columns: 250px 1fr;
    }
}

/* Sidebar */
aside {
    display: none;
}

@media (min-width: 768px) {
    aside {
        display: block;
    }
}

.sidebar-sticky {
    position: sticky;
    top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.index-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: #eff6ff;
    color: var(--primary);
}

.sidebar-link.active {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
}

.tip-card {
    background: var(--primary);
    color: white;
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 4px solid rgba(0,0,0,0.2);
}

.tip-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.tip-content {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Main Content Components */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 2rem;
    padding: 2.5rem;
    color: white;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 8px solid var(--secondary);
}

.hero-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 40rem;
}

.hero-credits {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Sections */
section {
    margin-bottom: 4rem;
    scroll-margin-top: 6rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    display: block;
    width: 0.5rem;
    height: 2rem;
    background: var(--secondary);
    border-radius: 9999px;
}

/* Cards & Components */
.card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.objective-card {
    border-left: 8px solid var(--primary);
    font-style: italic;
    color: var(--text-muted);
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Custom Widgets */
.spectrum-container {
    background: #0f172a;
    padding: 2rem;
    border-radius: 1.5rem;
    color: white;
}

.spectrum-bar {
    background: linear-gradient(to right, #8b00ff, #0000ff, #00ffff, #00ff00, #ffff00, #ff7f00, #ff0000);
    height: 30px;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.system-card {
    padding: 2rem;
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.system-card.rgb {
    background: #000;
    color: white;
}

.system-card.cmyk {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

/* Utilities */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 1rem; }

footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
}

.footer-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.dot {
    width: 2.5rem;
    height: 0.25rem;
    border-radius: 9999px;
}

.dot-primary { background: var(--primary); }
.dot-secondary { background: var(--secondary); }

/* Buttons */
.btn-drive {
    background: #34a853;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.2);
    border: none;
    cursor: pointer;
}

.btn-drive:hover {
    background: #2d9249 !important;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(52, 168, 83, 0.3);
    color: white !important;
}

/* Interactive Color Tools */
.interactive-tool-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
}

.tool-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .tool-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* Color Wheel */
.wheel-canvas-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1/1;
}

#colorWheel {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.wheel-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Color Mixer */
.mixer-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mixer-slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mixer-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.mixer-preview {
    width: 100%;
    height: 150px;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-family: monospace;
    transition: background-color 0.2s ease;
}

/* Harmony Badges */
.harmony-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.harmony-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.harmony-btn {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.harmony-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.color-swatch-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.swatch {
    flex: 1;
    height: 60px;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Lab Mixer Styles */
.lab-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.lab-card {
    background: white;
    border: 1px solid #eef2f7;
    border-radius: 1.5rem;
    padding: 2rem;
    width: 280px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lab-card-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.1em;
}

.lab-color-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lab-color-circle.result {
    width: 180px;
    height: 180px;
    border: 8px solid #f8fafc;
}

.lab-selection-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.lab-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.lab-swatch {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.lab-swatch:hover {
    transform: scale(1.1);
}

.lab-swatch.active {
    border-color: #1e293b;
    box-shadow: 0 0 0 2px white inset;
}

.lab-operator {
    font-size: 3rem;
    font-weight: 900;
    color: #cbd5e1;
}

.lab-result-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lab-result-info {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 1rem;
    padding: 1.5rem;
    min-width: 200px;
    text-align: center;
}

.lab-result-info h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.lab-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
