/* Gerador de Cores - Estilo Liquid Glass iOS 26 */

:root {
    --inter: 'Inter', sans-serif;
    --radius: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    
    --bg-dark: #0f0f1e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent: #00d4ff;
    --accent-alt: #ff6b9d;
    --success: #00ff88;
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--inter);
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Background Orbs */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #00d4ff, #0099ff);
    top: -100px;
    left: -100px;
    animation: float 20s infinite ease-in-out;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #ff6b9d, #ff00ff);
    bottom: -50px;
    right: -50px;
    animation: float 25s infinite ease-in-out reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    top: 50%;
    left: 50%;
    animation: float 22s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(30px, -50px);
    }
    50% {
        transform: translate(-20px, 20px);
    }
    75% {
        transform: translate(50px, 30px);
    }
}

/* Container Principal */
.container {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header-section {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown 0.6s ease-out;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
}

.header-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fase Container */
.fase-container {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Questões */
.questoes-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.progresso-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progresso-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    transition: width 0.3s ease;
    border-radius: 10px;
}

.questoes-container {
    min-height: 300px;
    margin-bottom: 30px;
}

.questao-item {
    animation: slideIn 0.4s ease-out;
    margin-bottom: 20px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.questao-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.questao-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Inputs & Selects */
.questao-input,
.questao-select,
.questao-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--inter);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.questao-input:focus,
.questao-select:focus,
.questao-textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.questao-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio/Checkbox Buttons */
.opcoes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.opcao-btn {
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--inter);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.opcao-btn:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.08);
}

.opcao-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 107, 157, 0.2));
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* Botões */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--inter);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-height: 48px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: #000;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
}

/* Gerando */
.gerando-card {
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gerando-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.gerando-card p {
    color: var(--text-secondary);
}

/* Resultado */
.resultado-header {
    text-align: center;
    margin-bottom: 40px;
}

.resultado-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.resultado-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* Grid de Cores */
.cores-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.cor-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.cor-preview {
    width: 100%;
    height: 150px;
    background: var(--cor-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cor-preview:hover::after {
    opacity: 1;
}

.cor-preview::after {
    content: '📋 Copiar';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.cor-info {
    padding: 16px;
}

.cor-nome {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.cor-codigo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    cursor: pointer;
    word-break: break-all;
}

.cor-codigo:hover {
    color: var(--accent);
}

/* Notificação de Cópia */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: var(--success);
    padding: 14px 24px;
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    font-weight: 600;
    animation: slideInRight 0.4s ease-out;
    z-index: 1000;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 30px 16px;
    }

    .header-section h1 {
        font-size: 2.2rem;
    }

    .questoes-wrapper {
        padding: 24px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .cores-container {
        grid-template-columns: 1fr;
    }

    .opcoes-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .header-section h1 {
        font-size: 1.8rem;
    }

    .questoes-wrapper {
        padding: 16px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}
