:root {
    --primary: #50A2FF;
    --primary-dark: #0057af;
    --primary-light: #0076c0;
    --accent: #f0c040;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #868e96;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --red-live: #e53e3e;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 50px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-img {
    width: 200px;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-prefeitura {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

.logo-cidade {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--red-live);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.4);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: dotBlink 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 15px rgba(229, 62, 62, 0.3); }
    50% { box-shadow: 0 0 30px rgba(229, 62, 62, 0.6); }
}

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

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

.whatsapp{
    color: #e53e3e; 
    text-decoration: none;
}
.whatsapp:hover{
    color:#00c100;
    font-weight: bold;
}

/* ============================================
   VIDEO CONTAINER
   ============================================ */

.video-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: var(--gray-900);
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-top: 3px solid var(--primary);
    background: linear-gradient(to right, var(--white), var(--gray-50));
}

.info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stream-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
}

.stream-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 400;
}

.info-right {
    display: flex;
    align-items: center;
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

/* ============================================
   INFO CARDS
   ============================================ */

.info-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.card-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.card-content p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

/* ============================================
   Clima
   ============================================ */

.weather-container {
    margin-top: 30px;
    padding: 0 15px; /* Adiciona um respiro lateral para telas pequenas */
    box-sizing: border-box;
}

.weather-source {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    word-wrap: break-word; /* Evita que o link da fonte quebre o layout no celular */
}

.weather-cards {
    display: grid;
    /* Usa auto-fit para criar colunas que se quebram sozinhas quando não há espaço */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.card {
    padding: 20px;
    border-radius: 12px;
    color: #333;
    /* Garante que o conteúdo fique centralizado em telas menores */
    text-align: center; 
}

.card h3 {
    /* Fonte fluida: diminui em telas pequenas, cresce até 28px em telas grandes */
    font-size: clamp(20px, 6vw, 28px);
    margin-top: 5px;
    white-space: nowrap; /* Evita que a temperatura quebre em duas linhas */
}

.card-blue {
    background: #e3edf9;
    color: #2a5bd7;
}

.card-green {
    background: #e3f4ec;
    color: #1f8f5f;
}

.card-red {
    background: #fdeaea;
    color: #c0392b;
}

canvas {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    /* Força o gráfico a ocupar 100% da largura disponível */
    width: 100% !important;
    height: auto !important;
    max-height: 400px; /* Limita a altura em telas muito grandes para não esticar */
}

/* Ajustes finos para telas muito pequenas (celulares) */
@media (max-width: 480px) {
    .weather-container h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .weather-cards {
        /* Se a tela for muito fina, garante que cada card ocupe uma linha inteira */
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: 4px;
}

.footer-logo-img {
    width: 200px;
    object-fit: cover;
}

.footer-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-main {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.footer-sub {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.footer-dev {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
    font-style: italic;
}

.footer-dev > a {
    text-decoration: none;
    color: var(--white);
}

.footer-dev > a:hover {
    font-weight: bold;
}

.footer-bottom {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    width: 100%;
}

.footer-bottom p {
    font-size: 12px;
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header-content {
        padding: 12px 16px;
    }

    .logo-img {
        width: 150px;
    }

    .logo-prefeitura {
        font-size: 9px;
    }

    .logo-cidade {
        font-size: 18px;
    }

    .live-badge {
        padding: 5px 12px;
        font-size: 10px;
    }

    .main-content {
        padding: 16px 12px;
    }

    .video-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .stream-title {
        font-size: 16px;
    }

    .stream-subtitle {
        font-size: 13px;
    }

    .info-section {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }

    .info-card {
        padding: 18px;
    }

    .footer-content {
        padding: 28px 16px 14px;
    }

    .footer-main {
        font-size: 16px;
    }

    .footer-sub {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .logo-text {
        display: none;
    }

    .live-badge span:not(.live-dot) {
        display: none;
    }

    .live-badge {
        padding: 8px;
    }
}
