:root {
    /* Light theme (default) */
    --color-primary: #2E7D32;
    --color-secondary: #1B5E20;
    --color-accent: #81C784;
    --color-text: #333;
    --color-background: #F1F8E9;
    --color-card-bg: #ffffff;
    --color-shadow: rgba(0,0,0,0.1);
    --error-color: #dc3545;
    --text-color: #333;
    --background-color: #fff;
    --input-background: #fff;
    --border-color: #ddd;
}

.access-restricted {
    background: var(--color-background);
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: Arial, sans-serif;
}

.access-restricted .container {
    background: var(--color-card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--color-shadow);
    padding: 20px;
    text-align: center;
    width: 300px;
}

.access-restricted h1 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.access-restricted p {
    margin-bottom: 15px;
}

.access-restricted .error {
    color: #ff0000;
    margin-bottom: 15px;
}

.access-restricted .access-form {
    display: flex;
    flex-direction: column;
}

.access-restricted .access-form input[type="text"] {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.access-restricted .access-form button {
    background: var(--color-primary);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.access-restricted .access-form button:hover {
    background: var(--color-secondary);
}

[data-theme="dark"] {
    --color-primary: #388E3C;
    --color-secondary: #2E7D32;
    --color-accent: #4CAF50;
    --color-text: #E0E0E0;
    --color-background: #1C1C1C;
    --color-card-bg: #2D2D2D;
    --color-shadow: rgba(0,0,0,0.3);
    --text-color: #fff;
    --background-color: #333;
    --input-background: #444;
    --border-color: #555;
}

[data-accessibility="high"] {
    --font-size-base: 18px;
    --line-height: 1.6;
    --contrast-boost: 1.2;
}

/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: auto; /* Permite rolagem normal da página */
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-y: scroll; /* Garante barra de rolagem vertical sempre visível */
}

.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px; /* Espaço para o menu fixo */
    overflow-y: auto; /* Garante rolagem vertical quando necessário */
}

.map-container {
    width: 100%;
    height: 50vh;
    background-color: var(--color-accent);
    margin-bottom: 20px;
}

.score-board {
    display: flex;
    justify-content: space-around;
    padding: 4px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
    margin: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.score-item {
    text-align: center;
    color: white;
}

.score-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.score-number {
    font-size: 1.8rem;
    font-weight: bold;
}

/* Menu fixo atualizado */

.rotate-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
}

.modal-rotatable-image {
    transition: transform 0.3s ease-in-out;
}
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-card-bg);
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    box-shadow: 0 -2px 4px var(--color-shadow);
    z-index: 1000;
}

.menu-button {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-button.active {
    color: var(--color-primary);
    background: var(--color-background);
    box-shadow: 0 2px 4px var(--color-shadow);
}

.menu-button:hover {
    transform: translateY(-2px);
}

.menu-button.home-btn {
    margin-left: 10px;
}

.menu-button.report-btn {
    transform: scale(1.2);
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 4px var(--color-shadow);
}

.menu-button.report-btn:hover {
    background: var(--color-secondary);
}

.menu-button.profile-btn {
    margin-right: 10px;
}

/* Ajustes para acessibilidade */
[data-accessibility="high"] .menu-button {
    font-size: 28px;
    width: 60px;
    height: 60px;
}

/* Ajustes para tema escuro */
[data-theme="dark"] .menu-button.report-btn {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Ajustes para dispositivos móveis */
@media (max-width: 768px) {
    .bottom-menu {
        padding: 10px;
    }
    
    .menu-button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    [data-accessibility="high"] .menu-button {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}

.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    background: var(--color-card-bg);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--color-shadow);
    z-index: 1000;
}

.switch-button {
    padding: 12px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-button:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

.switch-button.active {
    background-color: var(--color-secondary);
}

[data-accessibility="high"] .menu-button i,
[data-accessibility="high"] .switch-button i {
    font-size: 1.8rem;
}

/* Responsividade para smartphones */
@media (max-width: 768px) {
    .score-board {
        flex-direction: column;
    }
    
    .score-item {
        width: 100%;
        border-bottom: 1px solid var(--color-accent);
    }
    
    .score-item:last-child {
        border-bottom: none;
    }
}

/* Ajustes de acessibilidade para o score-board */
[data-accessibility="high"] .score-board {
    padding: 25px;
    gap: 20px;
}

[data-accessibility="high"] .score-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

[data-accessibility="high"] .score-number {
    font-size: 2rem;
}

[data-accessibility="high"] .menu-button {
    padding: 15px 30px;
    font-size: 1.2rem;
}

/* Estilos para a galeria de imagens */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    background: var(--color-card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-item img:hover {
    opacity: 0.8;
}

.image-info {
    padding: 15px;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.4;
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-card-bg);
    box-shadow: 0 -2px 10px var(--color-shadow);
    z-index: 1001;
    padding: 20px;
}

.cookie-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cookie-content h2 {
    color: var(--color-text);
    margin-bottom: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.cookie-accept, .cookie-reject {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.cookie-accept {
    background-color: var(--color-primary);
    color: white;
}

.cookie-reject {
    background-color: #666;
    color: white;
}

.cookie-accept:hover, .cookie-reject:hover {
    transform: translateY(-2px);
}

/* Warning Page Styles */
.warning-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.warning-content {
    background: var(--color-card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--color-shadow);
    max-width: 600px;
    width: 100%;
}

.warning-content h1 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.warning-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.warning-content li {
    margin-bottom: 10px;
    color: var(--color-text);
}

.warning-actions {
    margin-top: 30px;
    text-align: center;
}

.button-primary {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.button-primary:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

/* Accessibility adjustments for warning page */
[data-accessibility="high"] .cookie-content h2,
[data-accessibility="high"] .warning-content h1 {
    font-size: 1.8rem;
}

[data-accessibility="high"] .cookie-content p,
[data-accessibility="high"] .warning-content p,
[data-accessibility="high"] .warning-content li {
    font-size: var(--font-size-base);
    line-height: var(--line-height);
}

/* Estilos para o modal de imagem em tela cheia */
.fullscreen-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
    align-items: center;
    justify-content: center;
}

.fullscreen-modal-content {
    margin: auto;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover; /* Garante que a imagem inteira seja visível, sem cortar */
}

.fullscreen-modal-text {
    color: #f1f1f1;
    font-size: 18px;
    padding: 10px 0;
    text-align: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1002;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos para o modal de aviso */
.warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

.warning-modal-content {
    position: relative;
    z-index: 2001;
    background-color: var(--color-card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    animation: modal-appear 0.3s ease-out;
}

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

/* Ajustes para acessibilidade no modal */
[data-accessibility="high"] .warning-modal-content {
    font-size: var(--font-size-base, 18px);
    line-height: var(--line-height, 1.6);
}

/* Estilos para mensagens de geolocalização */
.geolocation-message {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.geolocation-message.info {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.geolocation-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.geolocation-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Ajustes para tema escuro */
[data-theme="dark"] .geolocation-message.info {
    background-color: #0d47a1;
    color: #e3f2fd;
    border-color: #1976d2;
}

[data-theme="dark"] .geolocation-message.success {
    background-color: #1b5e20;
    color: #e8f5e9;
    border-color: #2e7d32;
}

[data-theme="dark"] .geolocation-message.error {
    background-color: #b71c1c;
    color: #ffebee;
    border-color: #c62828;
}

/* Ajustes para alta acessibilidade */
[data-accessibility="high"] .geolocation-message {
    font-size: 18px;
    padding: 20px 25px;
    font-weight: bold;
}

/* Animação suave */
.geolocation-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Custom Alert Styles */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.custom-alert {
    background: var(--color-card-bg);
    color: var(--color-text);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--color-shadow);
    max-width: 90%;
    width: 400px;
    animation: alertAppear 0.3s ease-out;
}

.custom-alert-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.custom-alert-message {
    margin-bottom: 20px;
    line-height: 1.4;
}

.custom-alert-button {
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.custom-alert-button:hover {
    background: var(--color-secondary);
}

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

/* High accessibility adjustments */
[data-accessibility="high"] .custom-alert {
    font-size: var(--font-size-base, 18px);
    padding: 25px;
}

[data-accessibility="high"] .custom-alert-title {
    font-size: 1.4em;
}

[data-accessibility="high"] .custom-alert-button {
    font-size: 18px;
    padding: 15px;
}
