/* ===================================================================== */
/*                  CALCULADORA DE TEORIA DAS CORES - CSS              */
/* ===================================================================== */

/* ===================================
   VARIÁVEIS DE CORES - ARTES
   ================================== */
:root {
    --primary: #e91e63;          /* Rosa criativo */
    --secondary: #9c27b0;        /* Roxo artístico */
    --accent: #ff9800;           /* Laranja inspiração */
    --light: #fce4ec;            /* Fundo rosa claro */
    --gradient: linear-gradient(135deg, #e91e63, #9c27b0);
}

/* ===================================
   LAYOUT PRINCIPAL E RESPONSIVIDADE
   ================================== */

/* Previne barra horizontal */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.teoria-cores-calculator-section {
    margin-bottom: 2rem;
}

/* Container da calculadora */
.teoria-cores-container {
    padding: 2rem 1rem;
}

.teoria-cores-container h1 {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.teoria-cores-description {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===================================
   CALCULADORA - CARD PRINCIPAL
   ================================== */

.teoria-cores-calculator-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.15);
    border: 1px solid #e0e6ed;
    padding: 2rem;
    margin-bottom: 2rem;
}

.teoria-cores-input-section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

/* ===================================
   INPUTS E FORMULÁRIOS
   ================================== */

.teoria-cores-input-group {
    margin-bottom: 1.5rem;
}

.teoria-cores-input-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.teoria-cores-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.teoria-cores-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    outline: none;
}

/* Inputs para diferentes formatos */
.teoria-cores-format-inputs {
    background: var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #e0e6ed;
}

.teoria-cores-rgb-inputs,
.teoria-cores-hsl-inputs,
.teoria-cores-hsv-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.teoria-cores-format-inputs input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.teoria-cores-format-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
    outline: none;
}

/* ===================================
   BOTÕES
   ================================== */

.teoria-cores-buttons-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0 1.5rem 0;
}

.teoria-cores-btn-primary, .teoria-cores-btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.teoria-cores-btn-primary {
    background: var(--gradient);
    color: white;
}

.teoria-cores-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.3);
}

.teoria-cores-btn-secondary {
    background: #f8f9fa;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.teoria-cores-btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ===================================
   EXEMPLOS RÁPIDOS
   ================================== */

.teoria-cores-examples-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e6ed;
}

.teoria-cores-examples-section h3 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.teoria-cores-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.teoria-cores-example-btn {
    background: linear-gradient(135deg, var(--light) 0%, #f8e1e7 100%);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-align: center;
}

.teoria-cores-example-btn:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
}

/* ===================================
   RESULTADO E PREVIEW DE CORES
   ================================== */

.teoria-cores-result-section {
    margin: 2rem 0;
}

.teoria-cores-result-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.15);
    border: 1px solid #e0e6ed;
}

.teoria-cores-result-card h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Preview da cor */
.teoria-cores-preview {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid #e0e6ed;
}

.teoria-cores-color-preview {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    border: 3px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: relative;
}

.teoria-cores-color-preview::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 18px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    pointer-events: none;
}

.teoria-cores-color-info h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.teoria-cores-color-info p {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
}

/* Formatos convertidos */
.teoria-cores-formats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.teoria-cores-format-result {
    background: var(--light);
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.teoria-cores-format-result h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.teoria-cores-format-value {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    background: white;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid #e0e6ed;
    cursor: pointer;
    transition: all 0.3s ease;
}

.teoria-cores-format-value:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.1);
}

/* Paleta de cores relacionadas */
.teoria-cores-palette {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e6ed;
}

.teoria-cores-palette h4 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.teoria-cores-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.teoria-cores-palette-item {
    text-align: center;
}

.teoria-cores-palette-color {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.8rem;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.teoria-cores-palette-color:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.teoria-cores-palette-label {
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.teoria-cores-palette-value {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.8rem;
}

/* ===================================
   EXPLICAÇÃO E AVISO LEGAL
   ================================== */

.teoria-cores-explanation-section, .teoria-cores-legal-section {
    margin: 2rem 0;
}

.teoria-cores-explanation-card, .teoria-cores-legal-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
    padding: 2rem;
}

.teoria-cores-explanation-card h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.teoria-cores-legal-card {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.teoria-cores-legal-card h3 {
    color: #856404;
    margin-bottom: 1rem;
}

.teoria-cores-legal-card p {
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   CARDS DINÂMICOS - COMO FOI CALCULADO E FUNDAMENTAÇÃO
   ================================== */

/* Card explicação dinâmico */
.calc-explanation {
    background: linear-gradient(135deg, var(--light) 0%, #f8e1e7 100%);
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    animation: slideInUp 0.5s ease;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.1);
}

.calc-explanation h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.8rem;
}

/* Card fundamentação dinâmico */
.calc-legal {
    background: linear-gradient(135deg, var(--light) 0%, #f8e1e7 100%);
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    animation: slideInUp 0.5s ease;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.1);
}

.calc-legal h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.8rem;
}

/* Dados fornecidos nos cards dinâmicos */
.dados-fornecidos p {
    margin: 0.3rem 0;
    padding-left: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* ===================================
   SEÇÃO EDUCACIONAL - ESTILOS OBRIGATÓRIOS
   ================================== */

/* Container principal educacional */
.educational-content {
    padding: 2rem 1rem;
}

/* Cards educacionais - OBRIGATÓRIO */
.content-block {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(233, 30, 99, 0.15);
}

.content-block h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.5rem;
}

.content-block h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-block p {
    color: #5a6c7d;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* ===================================
   FÓRMULAS - VISUAL DESTACADO OBRIGATÓRIO
   ================================== */

.formula-highlight {
    background: linear-gradient(135deg, var(--light) 0%, #f8e1e7 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}

.formula-main {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

/* Grid de fórmulas */
.formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.formula-item {
    background: var(--light);
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.formula-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 0;
}

/* ===================================
   EXEMPLOS PRÁTICOS - VISUAL
   ================================== */
.example-item {
    background: var(--light);
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 1.5rem;
    margin: 1rem 0;
}

.example-calculation {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #e0e6ed;
}

.example-calculation p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ===================================
   DICAS - LISTA VISUAL
   ================================== */
.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    background: linear-gradient(135deg, var(--light) 0%, #fff 100%);
    border: 1px solid #e0e6ed;
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
    margin: 0.8rem 0;
    transition: all 0.3s ease;
}

.tips-list li:hover {
    background: var(--gradient);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.2);
}

/* ===================================
   APLICAÇÕES - GRID COLORIDO OBRIGATÓRIO
   ================================== */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.application-item {
    background: linear-gradient(135deg, var(--light) 0%, #f8e1e7 100%);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.application-item:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.3);
}

.application-item h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.application-item:hover h4 {
    color: white;
}

.application-item:hover p{
    color: white;
}

/* ===================================
   REFERÊNCIAS - NOVA SEÇÃO FORMATADA
   ================================== */
.referencias-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
}

.referencias-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referencia-item {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    line-height: 1.6;
    color: #2c3e50;
    font-size: 0.95rem;
}

.referencia-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.15);
    border-left-color: var(--accent);
}

.referencia-item:last-child {
    margin-bottom: 0;
}

.accuracy-note {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.accuracy-note h5 {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accuracy-note p {
    color: #856404;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

/* ===================================
   REFERÊNCIAS - LISTA PERSONALIZADA OBRIGATÓRIA
   ================================== */
.references-list {
    list-style: none;
    padding: 0;
}

.references-list li {
    background: var(--light);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    margin: 0.8rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===================================
   PASSOS DE CÁLCULO
   ================================== */
.teoria-cores-step {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary);
}

.teoria-cores-step h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ===================================
   RESPONSIVIDADE MOBILE
   ================================== */

@media (max-width: 768px) {
    .teoria-cores-container {
        padding: 1rem 0.5rem;
    }
    
    .teoria-cores-container h1 {
        font-size: 2rem;
    }
    
    .teoria-cores-calculator-card {
        padding: 1.5rem;
    }
    
    .teoria-cores-rgb-inputs,
    .teoria-cores-hsl-inputs,
    .teoria-cores-hsv-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .teoria-cores-buttons-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .teoria-cores-btn-primary, .teoria-cores-btn-secondary {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .teoria-cores-examples-grid {
        grid-template-columns: 1fr;
    }
    
    .teoria-cores-preview {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .teoria-cores-formats {
        grid-template-columns: 1fr;
    }
    
    .teoria-cores-palette-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
}