/*
 * PALETAS DE CORES
 * Descomente a paleta desejada e comente as outras para mudar o tema
 */

/* Importando fonte Caprizant Bold */
@font-face {
    font-family: 'Caprizant Bold';
    src: url('https://fonts.cdnfonts.com/css/caprizant') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* PALETA ATUAL - Carnavalesca com roxo */
:root {
	/* Cores do Brasil */
	--brazil-blue: #2196F3;
	--brazil-yellow: #FFD700;
	--brazil-green: #2ECC71;

	/* Cores da interface */
	--bg-purple: #8E44AD;
	--accent-yellow: #FFD700;
	--accent-green: #2ECC71;
	--accent-pink: #E91E63;
	--accent-blue: #2196F3;

	/* Cores utilitárias */
	--light: #f8f9fa;
	--dark: #333;
}

/*
 * PALETA ANTERIOR - Pastel
 * Para usar esta paleta, comente a paleta atual acima e descomente este bloco
:root {
	// Cores originais do Brasil
	--blue: #009c3b;
	--yellow: #ffdf00;
	--green: #002776;

	// Cores Pastel
	--pastel-green: #A3E4D7;
	--pastel-yellow: #FFF9C4;
	--pastel-blue: #BBDEFB;
	--neon-pink: #FF4081;
	--neon-green: #39FF14;

	// Cores utilitárias
	--light: #f8f9fa;
	--dark: #333;
}
 */

/*
 * PALETA ORIGINAL - Azul
 * Para usar esta paleta, comente a paleta atual e descomente este bloco
:root {
	// Cores do Brasil
	--blue: #009c3b;
	--yellow: #ffdf00;
	--green: #002776;

	// Cores utilitárias
	--light: #f8f9fa;
	--dark: #333;
}
 */

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

html, body {
	height: 100%;
	width: 100%;
	overflow: hidden;
}

/*
 * ESTILOS DE FUNDO
 * Descomente o estilo desejado e comente os outros para mudar o fundo
 */

/* Estilo Atual - Fundo roxo/violáceo */
body {
	font-family: 'Montserrat', sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	position: relative;
	/* O background e a cor são definidos dinamicamente pelo JS */
}

/*
 * Estilo Anterior - Fundo verde/azul pastel
 * Para usar este estilo, comente o estilo atual e descomente este bloco
body {
	font-family: 'Montserrat', sans-serif;
	background: linear-gradient(135deg, var(--pastel-blue) 0%, var(--pastel-green) 100%);
	color: var(--dark);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	position: relative;
}
 */

/*
 * Estilo Original - Fundo azul
 * Para usar este estilo, comente o estilo atual e descomente este bloco
body {
	font-family: 'Montserrat', sans-serif;
	background: linear-gradient(135deg, var(--green) 0%, #1a4b9c 100%);
	color: var(--light);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	position: relative;
}
 */

#confetti-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 20px;
	width: 100%;
	position: relative;
	z-index: 10;
	background-color: rgba(0, 0, 0, 0.2);
}

.copyright {
	font-size: 0.9rem;
	color: var(--accent-yellow);
	display: flex;
	align-items: center;
	gap: 8px;
}

.brazil-flag {
	vertical-align: middle;
	box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
	border-radius: 2px;
}

.right-controls {
	display: flex;
	align-items: center;
	gap: 15px;
}

.theme-selector select {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: 1px solid var(--light);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.theme-selector select:hover,
.theme-selector select:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

.theme-selector select option {
    background-color: #333;
    color: white;
}

.font-selector {
    margin-left: 10px;
}

.font-selector select {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: 1px solid var(--light);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.font-selector select:hover,
.font-selector select:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

.font-selector select option {
    background-color: #333;
    color: white;
}

.language-selector {
	display: flex;
	gap: 5px;
}

.lang-btn {
	background-color: transparent;
	color: var(--light);
	border: 1px solid var(--light);
	border-radius: 4px;
	padding: 5px 8px;
	font-size: 0.8rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.lang-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
	background-color: var(--accent-pink);
	color: white;
	border-color: var(--accent-pink);
}

.donate-btn {
	background-color: var(--accent-pink);
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 30px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.donate-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.donate-btn svg {
	width: 20px;
	height: 20px;
}

.page-container {
    display: flex;
    flex: 1;
    position: relative;
    z-index: 2;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.side-ad {
    width: 160px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
}

.left-ad, .right-ad {
    background-color: transparent;
}

.hero {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 20px;
	position: relative;
	z-index: 2;
}

.countdown-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.countdown-title {
	font-family: 'Dancing Script', cursive;
	font-size: 10rem;
	font-weight: bold;
	margin-bottom: 20px;
	color: #005BAC; /* Texto em preto */
	position: relative;
	z-index: 1;
	text-shadow:
        2px 2px 0 #FF9800,
        2px -2px 0 #FF5722,
        -2px 2px 0 #FF3D00,
        -2px -2px 0 #FF5722,
        2px 2px 0 #FF9800,
        2px -2px 0 #FF5722,
        -2px 2px 0 #FF3D00,
        -2px -2px 0 #FF5722,
        3px 3px 0 #FF9800,
        3px -3px 0 #FF5722,
        -3px 3px 0 #FF3D00,
        -3px -3px 0 #FF5722;
    animation: gradientMove 1.7s linear infinite;
	white-space: nowrap;
}

@keyframes gradientMove {
    0% {
        text-shadow:
            2px 2px 0 #FF9800,
            2px -2px 0 #FF5722,
            -2px 2px 0 #FF3D00,
            -2px -2px 0 #FF5722,
            3px 3px 0 #FF9800,
            3px -3px 0 #FF5722,
            -3px 3px 0 #FF3D00,
            -3px -3px 0 #FF5722;
    }
    25% {
        text-shadow:
            2px 2px 0 #FF5722,
            2px -2px 0 #FF3D00,
            -2px 2px 0 #FF5722,
            -2px -2px 0 #FF9800,
            3px 3px 0 #FF5722,
            3px -3px 0 #FF3D00,
            -3px 3px 0 #FF5722,
            -3px -3px 0 #FF9800;
    }
    50% {
        text-shadow:
            2px 2px 0 #FF3D00,
            2px -2px 0 #FF5722,
            -2px 2px 0 #FF9800,
            -2px -2px 0 #FF3D00,
            3px 3px 0 #FF3D00,
            3px -3px 0 #FF5722,
            -3px 3px 0 #FF9800,
            -3px -3px 0 #FF3D00;
    }
    75% {
        text-shadow:
            2px 2px 0 #FF5722,
            2px -2px 0 #FF9800,
            -2px 2px 0 #FF3D00,
            -2px -2px 0 #FF5722,
            3px 3px 0 #FF5722,
            3px -3px 0 #FF9800,
            -3px 3px 0 #FF3D00,
            -3px -3px 0 #FF5722;
    }
    100% {
        text-shadow:
            2px 2px 0 #FF9800,
            2px -2px 0 #FF5722,
            -2px 2px 0 #FF3D00,
            -2px -2px 0 #FF5722,
            3px 3px 0 #FF9800,
            3px -3px 0 #FF5722,
            -3px 3px 0 #FF3D00,
            -3px -3px 0 #FF5722;
    }
}

.countdown-text {
	font-family: 'Satisfy';
	font-size: 1.9rem;
	font-weight: bold;
	color: #005BAC; /* Texto em preto */
	position: relative;
	z-index: 1;
	text-shadow:
        2px 2px 0 #FF9800,
        2px -2px 0 #FF5722,
        -2px 2px 0 #FF3D00,
        -2px -2px 0 #FF5722,
        2px 2px 0 #FF9800,
        2px -2px 0 #FF5722;
				animation: gradientMove 2s linear infinite;
}

.countdown-unit {
	font-family: 'Satisfy';
	font-size: 1.9rem;
	font-weight: bold;
	color: #005BAC; /* Texto em preto */
	position: relative;
	z-index: 1;
	text-shadow:
        2px 2px 0 #FF9800,
        2px -2px 0 #FF5722,
        -2px 2px 0 #FF3D00,
        -2px -2px 0 #FF5722,
        2px 2px 0 #FF9800,
        2px -2px 0 #FF5722;
				animation: gradientMove 2s linear infinite;
}

.countdown-days {
	font-size: 15rem;
	font-weight: bold;
	color: var(--accent-yellow);
	text-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
	line-height: 1;
	animation: pulse 1.5s infinite alternate;
	transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.countdown-days-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.font-dancing-script {
    font-family: 'Dancing Script', cursive;
}

.font-lobster {
    font-family: 'Lobster', cursive;
}

.font-pacifico {
    font-family: 'Pacifico', cursive;
}

.font-satisfy {
    font-family: 'Satisfy', cursive;
}

.font-righteous {
    font-family: 'Righteous', cursive;
}

.font-russo-one {
    font-family: 'Russo One', sans-serif;
}

.font-kaushan-script {
    font-family: 'Kaushan Script', cursive;
}

.font-caprizant {
    font-family: 'Caprizant', 'Caprizant Bold', sans-serif;
}

.countdown-end {
	font-family: 'Dancing Script', cursive;
	font-size: 3rem;
	background: linear-gradient(to right, var(--brazil-yellow), var(--brazil-green));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	margin-top: 10px;
}

.footer {
	padding: 20px;
	text-align: center;
	width: 100%;
	position: relative;
	z-index: 2;
    background-color: transparent;
}

.footer-ads {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.ad-space {
	padding: 10px;
	background-color: rgba(255, 255, 255, 0.15);
	border-radius: 8px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--light);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    text-align: center;
    word-break: break-word;
    writing-mode: horizontal-tb;
}

.footer-ad {
    flex: 1;
    min-width: 300px;
    max-width: 728px;
    height: 90px;
    margin: 0 10px;
}

.side-ad .ad-space {
    width: 100%;
    min-height: 250px;
    height: calc(40vh - 20px);
    margin-bottom: 10px;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* Responsividade */
@media (max-width: 1200px) {
	.countdown-title {
		font-size: 4rem;
	}

	.countdown-text, .countdown-unit {
		font-size: 2rem;
	}

	.countdown-days {
		font-size: 8rem;
	}

    .side-ad {
        width: 120px;
    }

    .side-ad .ad-space {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
	.countdown-title {
		font-size: 4.5rem;
	}

	.countdown-text, .countdown-unit {
		font-size: 2rem;
	}

	.countdown-days {
		font-size: 10rem;
	}

	.countdown-days-container {
		flex-direction: column;
		gap: 5px;
	}

	.copyright {
		font-size: 0.8rem;
	}

	.donate-text {
		display: none;
	}

	.donate-btn {
		padding: 8px;
	}

    .theme-selector select {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .side-ad {
        display: none;
    }

    .page-container {
        flex-direction: column;
    }

    .footer-ads {
        flex-direction: column;
        gap: 15px;
    }

    .footer-ad {
        width: 100%;
        max-width: 100%;
        height: 80px;
        margin: 0;
    }
}

@media (max-width: 480px) {
	.countdown-title {
		font-size: 3.5rem;
		white-space: nowrap;
	}

	.countdown-text, .countdown-unit {
		font-size: 1.8rem;
	}

	.countdown-days {
		font-size: 9rem;
	}

	.copyright {
		font-size: 0.7rem;
	}

    .theme-selector {
        display: none;
    }
}

/* Para dispositivos muito pequenos como iPhone SE */
@media (max-width: 375px) {
	.countdown-title {
		font-size: 2.8rem;
		white-space: nowrap;
	}

	.countdown-days {
		font-size: 7rem;
	}

	.countdown-text, .countdown-unit {
		font-size: 1.5rem;
	}
}

@keyframes pulse {
	0% {
		transform: scale(1);
		text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	}
	100% {
		transform: scale(1.05);
		text-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
	}
}

.countdown-days.updating {
	animation: updating 0.5s ease-in-out;
}

@keyframes updating {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.2);
		color: var(--accent-green);
	}
	100% {
		transform: scale(1);
	}
}

/* Para dispositivos desktop com alturas menores */
@media (max-height: 768px) {
    .side-ad .ad-space {
        min-height: 200px;
        height: calc(30vh - 20px);
    }
}

/* Orientação paisagem em dispositivos móveis */
@media (max-width: 768px) and (orientation: landscape) {
    .page-container {
        padding-bottom: 20px;
    }

    .footer-ad {
        height: 60px;
    }
}

/* Estilos para acessibilidade */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Melhoria de estados de foco para acessibilidade */
button:focus,
select:focus,
a:focus {
    outline: 3px solid #4299e1;
    outline-offset: 2px;
}

.lang-btn:focus-visible,
.donate-btn:focus-visible {
    outline: 3px solid #4299e1;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Alto contraste para texto sobre fundo */
.ad-space {
    color: #000;
    background-color: rgba(255, 255, 255, 0.3);
}

/* Melhor indicação visual para estados ativos */
.lang-btn.active {
	background-color: var(--accent-pink);
	color: white;
	border-color: var(--accent-pink);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Melhor indicação de interatividade em botões */
.lang-btn:hover,
.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

/* Dica visual durante a navegação por teclado */
.lang-btn:focus-visible,
.donate-btn:focus-visible {
    position: relative;
}

.lang-btn:focus-visible::after,
.donate-btn:focus-visible::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #4299e1;
    border-radius: 8px;
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(66, 153, 225, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0);
    }
}

/* Ajustes de contraste para texto */
.countdown-title,
.countdown-text,
.countdown-unit {
    text-shadow:
        2px 2px 0 #000,
        -2px 2px 0 #000,
        2px -2px 0 #000,
        -2px -2px 0 #000;
}

/* Transições mais suaves para usuários com preferências de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .countdown-days {
        animation: none !important;
    }

    .countdown-title,
    .countdown-text,
    .countdown-unit {
        animation: none !important;
    }

    .lang-btn:hover,
    .donate-btn:hover {
        transform: none;
    }
}

/* Conteúdo SEO com texto otimizado */
.carnival-info {
    margin-top: 2rem;
    max-width: 800px;
    width: 100%;
}

.seo-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0 auto;
    max-width: 80%;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* URL no rodapé para SEO */
.site-url {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Estilos para dispositivos móveis com ajustes SEO */
@media (max-width: 480px) {
    .seo-text {
        font-size: 0.8rem;
        max-width: 95%;
    }
}

/* Ajuste para impressão para SEO */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    .countdown-title,
    .countdown-text,
    .countdown-days,
    .countdown-unit {
        color: #000 !important;
        text-shadow: none !important;
    }

    .top-bar,
    .side-ad,
    .footer-ads,
    .donate-btn,
    #confetti-canvas {
        display: none !important;
    }

    .carnival-info {
        margin-top: 1rem;
    }

    .seo-text {
        color: #000 !important;
        text-shadow: none;
    }
}

.skip-link {
    position: absolute;
    top: -40px; /* Move para fora da tela */
    left: 0;
    background: #4299e1; /* Azul acessível */
    color: white;
    padding: 10px 15px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 5px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0; /* Traz para a tela quando focado */
    outline: none;
}
