:root {
    --bg-color: #0d0d0d;
    --card-bg: rgba(26, 26, 26, 0.7);
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --vasco-red: #c91414;
    --vasco-gold: #c29d59;
    --border-subtle: rgba(255, 255, 255, 0.05);
    --glow-spread: rgba(201, 20, 20, 0.15);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

html {
    background-color: #0d0d0d;
}

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

body {
    background-color: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Imagem do estádio mais nítida */
.bg-stadium {
    position: fixed;
    inset: -10px;
    background-image: url('sao-januario.jpeg');
    background-size: cover;
    background-position: center top;
    filter: blur(4px);
    opacity: 0.65;
    z-index: -4;
    pointer-events: none;
    transform: scale(1.02);
}

/* Deixa ainda mais nítido no mobile */
@media (max-width: 768px) {
    .bg-stadium {
        filter: blur(1px);
        opacity: 0.75;
    }
}

/* Overlay escuro sobre a imagem */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(5, 0, 0, 0.50);
    z-index: -3;
    pointer-events: none;
}

/* Camada 1 de Fumaça — vermelha densa */
body::before {
    content: '';
    position: fixed;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background:
        radial-gradient(ellipse at 35% 55%, rgba(220, 20, 20, 0.22) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 25%, rgba(255, 40, 40, 0.16) 0%, transparent 38%),
        radial-gradient(ellipse at 15% 80%, rgba(180, 10, 10, 0.18) 0%, transparent 42%),
        radial-gradient(ellipse at 60% 70%, rgba(200, 0, 0, 0.12) 0%, transparent 35%);
    z-index: -2;
    pointer-events: none;
    animation: smokeMove1 18s infinite alternate ease-in-out;
    filter: blur(55px);
}

/* Camada 2 de Fumaça — mais clara e deslocada (via .smoke2) */
.smoke2 {
    content: '';
    position: fixed;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background:
        radial-gradient(ellipse at 65% 40%, rgba(255, 60, 60, 0.10) 0%, transparent 40%),
        radial-gradient(ellipse at 25% 65%, rgba(210, 20, 20, 0.13) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 80%, rgba(140, 0, 0, 0.09) 0%, transparent 38%);
    z-index: -1;
    pointer-events: none;
    animation: smokeMove2 24s infinite alternate-reverse ease-in-out;
    filter: blur(70px);
}

@keyframes smokeMove1 {
    0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
    25%  { transform: translate(6%, -8%) scale(1.12) rotate(1deg); }
    50%  { transform: translate(-8%, 5%) scale(0.92) rotate(-2deg); }
    75%  { transform: translate(10%, 3%) scale(1.18) rotate(1.5deg); }
    100% { transform: translate(-4%, -6%) scale(1.05) rotate(-1deg); }
}

@keyframes smokeMove2 {
    0%   { transform: translate(0, 0) scale(1.1) rotate(0deg); }
    30%  { transform: translate(-10%, 6%) scale(0.9) rotate(2deg); }
    60%  { transform: translate(7%, -9%) scale(1.2) rotate(-1.5deg); }
    100% { transform: translate(-5%, 4%) scale(0.95) rotate(1deg); }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
    justify-content: space-between;
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
    position: relative;
}

.top-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    opacity: 1;
    color: var(--vasco-gold);
}

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

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-pic-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--vasco-red), var(--vasco-gold));
    box-shadow: 0 5px 25px rgba(201, 20, 20, 0.3);
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
}

.title-container:active {
    transform: scale(0.95);
}

.small-cruz {
    font-size: 1.5rem;
    color: var(--vasco-red);
    filter: drop-shadow(0 0 5px rgba(201, 20, 20, 0.5));
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.quote-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quote-box {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    padding: 3rem 2rem;
    border-radius: 16px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px var(--glow-spread), inset 0 1px 0 rgba(255,255,255,0.1);
}

.quote-mark {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--vasco-gold);
    opacity: 0.3;
    line-height: 1;
}

.quote-mark:not(.end-mark) {
    top: 1rem;
    left: 1.5rem;
}

.end-mark {
    bottom: -1rem;
    right: 1.5rem;
}

/* Reaction Button & Particles */
.reaction-btn {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    border: 2px solid var(--vasco-gold);
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 5px;
}

.reaction-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(194, 157, 89, 0.4));
    transition: filter 0.2s ease;
}

.reaction-btn:hover {
    background: var(--vasco-red);
    border-color: var(--vasco-red);
    box-shadow: 0 0 20px rgba(201, 20, 20, 0.8);
    transform: translateX(-50%) scale(1.1);
}

.reaction-btn:hover img {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.reaction-btn:active {
    transform: translateX(-50%) scale(0.9);
}

.particle {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    display: inline-block;
    line-height: 1;
    user-select: none;
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(var(--rot));
    }
}

.quote-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1.6;
    text-align: center;
    font-style: italic;
    color: var(--text-primary);
    z-index: 1;
    position: relative;
}

/* Animação de entrada palavra por palavra */
@keyframes wordIn {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.word-span {
    display: inline-block;
    opacity: 0;
    animation: wordIn 0.35s ease forwards;
}

.quote-date {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--vasco-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer {
    text-align: center;
    margin-top: 3rem;
}

.footer-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 480px) {
    .footer-buttons {
        flex-direction: row;
    }
}

.action-btn {
    background-color: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
}

.action-btn:hover {
    background-color: var(--vasco-red);
    border-color: var(--vasco-red);
    box-shadow: 0 0 15px rgba(201, 20, 20, 0.4);
}

.whatsapp-btn:hover {
    background-color: #25D366;
    border-color: #25D366;
    color: #000;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.story-btn:hover {
    background-color: #E1306C;
    border-color: #E1306C;
    color: #fff;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.4);
}

.story-btn:disabled {
    background-color: var(--vasco-gold);
    border-color: var(--vasco-gold);
    color: #000;
    opacity: 1;
    cursor: wait;
    box-shadow: 0 0 20px rgba(194, 157, 89, 0.6);
}

.secondary-btn:hover {
    background-color: var(--vasco-gold);
    border-color: var(--vasco-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(194, 157, 89, 0.4);
}

.disclaimer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Badge de Frase Aleatória */
.random-badge {
    position: absolute;
    top: 12px;
    right: 14px;
    background: linear-gradient(135deg, var(--vasco-red), #8b0000);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(201, 20, 20, 0.4);
    animation: fadeIn 0.3s ease;
}

/* Contador de Reações */
.reaction-counter {
    margin-top: 1.8rem;
    font-size: 0.8rem;
    color: var(--vasco-gold);
    letter-spacing: 1px;
    min-height: 1.2em;
    transition: all 0.3s ease;
}

@keyframes pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.reaction-counter.pop {
    animation: pop 0.3s ease;
}

/* Botão Frase Aleatória */
.random-btn:hover {
    background-color: var(--vasco-gold);
    border-color: var(--vasco-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(194, 157, 89, 0.4);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--vasco-red);
}

.modal-content h2 {
    font-family: var(--font-heading);
    color: var(--vasco-gold);
    margin-bottom: 0.5rem;
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--vasco-gold);
}

.submit-btn {
    width: 100%;
    max-width: 100%;
    background-color: var(--vasco-red);
    border-color: var(--vasco-red);
    font-weight: bold;
    padding: 1rem;
}

.submit-btn:hover {
    background-color: #a51111;
    border-color: #a51111;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--vasco-gold);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 480px) {
    .quote-text {
        font-size: 1.3rem;
    }
    .quote-box {
        padding: 2rem 1.5rem;
    }
    .modal-content {
        padding: 2rem 1.5rem;
    }
}

/* Drawer Styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--bg-color);
    border-left: 1px solid var(--border-subtle);
    z-index: 1600;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.drawer.active {
    right: 0;
}

.drawer-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, rgba(201, 20, 20, 0.1), transparent);
}

.drawer-header h2 {
    font-family: var(--font-heading);
    color: var(--vasco-gold);
    font-size: 1.5rem;
}

.close-drawer {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-drawer:hover {
    color: var(--vasco-red);
}

.drawer-content {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s, border-color 0.3s;
}

.history-item:hover {
    transform: translateX(-5px);
    border-color: var(--vasco-gold);
    background: rgba(255, 255, 255, 0.05);
}

.history-date {
    font-size: 0.75rem;
    color: var(--vasco-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.history-quote {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
}

/* Easter Egg Shake Animation */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-effect {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

body.easter-egg-active {
    background-image: radial-gradient(circle at 50% 0%, rgba(201, 20, 20, 0.4) 0%, transparent 60%);
    transition: background-image 0.5s ease;
}
