:root {
    --bg-color: #0d1117; /* Very dark blue/grey, almost black */
    --surface-color: #161b22; /* Slightly lighter for cards */
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --accent-color: #00f0ff; /* Subtle Cyan Neon */
    --accent-hover: #00c0cc;
    --danger-color: #ff4444;
    --danger-hover: #cc0000;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Orbitron', monospace;
    
    --border-radius: 8px; /* Minimalist slightly rounded edges */
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* Ad Placeholders */
.ad-placeholder {
    width: 100%;
    max-width: 970px;
    margin: 30px auto;
    height: 90px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ad-top { margin-top: 20px; }
.ad-bottom { margin-bottom: 40px; }

/* Hero / Relógio Principal */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    min-height: 40vh;
    padding: 40px 0;
}

@media (min-width: 992px) {
    .hero-section {
        flex-direction: row;
        align-items: stretch;
    }
    .hero-content {
        flex: 2;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .hero-sidebar {
        flex: 1;
        display: flex;
        align-items: stretch;
    }
    .hero-trivia {
        margin: 0;
        height: 100%;
        justify-content: center;
    }
}

.clock-container {
    text-align: center;
}

.time-display {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    letter-spacing: 2px;
}

.time-display .seconds {
    font-size: 0.5em;
    color: var(--accent-color);
    margin-left: 10px;
}

.time-display .colon {
    animation: blink 1s infinite;
    opacity: 0.8;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.date-display {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.tool-card {
    background-color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.2);
}

.tool-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tool-display {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--accent-color);
}

/* Buttons */
.tool-controls {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn:hover {
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-danger:hover {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-small {
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* Timer Specifics */
.timer-presets {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.timer-custom {
    margin-bottom: 20px;
    width: 100%;
}

.timer-custom input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 150px;
    text-align: center;
    font-family: var(--font-sans);
}

.timer-custom input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 25px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    width: 100%;
    transition: width 1s linear;
}

/* World Clocks */
.world-clocks {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.world-clock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.world-clock-item:last-child {
    border-bottom: none;
}

.world-clock-item .city {
    font-weight: 600;
}

.world-clock-item .time {
    font-family: var(--font-display);
    color: var(--text-secondary);
}

/* Trivia Content */
.trivia-content {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-height: 100px;
    display: flex;
    align-items: center;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Cookie Banner Top */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-bottom: 2px solid var(--accent-color);
    z-index: 2000;
    display: none; /* Alterado via JS para 'flex' */
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.cookie-modal {
    padding: 20px;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .cookie-modal {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .cookie-modal-text {
        flex: 2;
    }
    .cookie-buttons {
        flex: 1;
        justify-content: flex-end;
    }
}

.cookie-modal h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.cookie-modal p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.cookie-links {
    margin-bottom: 15px;
}

.cookie-links a {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: underline;
    font-size: 0.9rem;
    margin-right: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-buttons .btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 5px;
}

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

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav a {
        margin: 0 10px;
    }
    
    .ad-placeholder {
        height: 50px; /* Mobile ad size */
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}
