* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #202124;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

header {
    background-color: #ffffff;
    color: #202124;
    padding: 16px;
    text-align: center;
    position: relative;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #dadce0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.back-button {
    position: absolute;
    left: 16px;
    color: #5f6368;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.2s;
}

.back-button:hover {
    opacity: 0.7;
}

.header-actions {
    position: absolute;
    right: 16px;
    display: flex;
    gap: 12px;
}

.header-action {
    color: #5f6368;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.header-action:hover {
    opacity: 0.7;
}

.wifi-toggle-section {
    padding: 16px;
    background: #ffffff;
    color: #202124;
    border-bottom: 1px solid #dadce0;
}

.wifi-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wifi-title {
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wifi-icon {
    font-size: 24px;
    color: #5f6368;
}

.toggle-wifi {
    position: relative;
    width: 48px;
    height: 24px;
}

.toggle-wifi input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: #4285f4;
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.wifi-subtitle {
    font-size: 14px;
    color: #5f6368;
}

.section-header {
    padding: 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dadce0;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.refresh-button {
    color: #5f6368;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.refresh-button:hover {
    transform: rotate(180deg);
}

.network-list {
    list-style-type: none;
    background: white;
}

.network-item {
    padding: 16px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.network-item:hover {
    background-color: #f8f9fa;
}

.network-item:last-child {
    border-bottom: none;
}

.network-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 16px;
}

.signal-icon {
    color: #5f6368;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.network-details {
    flex: 1;
}

.network-name {
    font-size: 16px;
    font-weight: 500;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.lock-icon {
    color: #5f6368;
    font-size: 14px;
}

.network-status {
    color: #5f6368;
    font-size: 14px;
}

.network-arrow {
    color: #5f6368;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.connected-indicator {
    color: #34a853;
    font-size: 14px;
    font-weight: 500;
}

.status-card {
    margin: 16px;
    padding: 18px;
    background: #007aff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: none;
}

#esp32StatusCard {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.2);
}

.status-title {
    font-weight: 600;
    /* Slightly thicker */
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.status-subtitle {
    color: #ffffff;
    font-size: 15px;
    font-weight: 300;
    /* Thinner font */
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.9;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    /* White dot looks better on solid blue */
    display: inline-block;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.4);
    animation: pulse-white 2.5s infinite;
}

@keyframes pulse-white {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.pulse-dot.offline {
    background: #ff453a;
    /* Softer Apple Red */
    box-shadow: none !important;
    animation: none !important;
}

.esp32-controls {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.esp32-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    transition: all 0.2s;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.esp32-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.esp32-btn:active {
    transform: scale(0.98);
}

.help-btn {
    background: #007aff;
}

.help-btn:hover {
    background: #0063d1;
}

.hidden {
    display: none;
}

/* Efeitos de piscar melhorados */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: all 0.05s ease-out;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    mix-blend-mode: multiply;
}

@keyframes flashPulse {
    0% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg) brightness(1);
    }

    25% {
        transform: scale(1.03) rotate(1deg);
        filter: hue-rotate(90deg) brightness(1.1);
    }

    50% {
        transform: scale(0.97) rotate(-1deg);
        filter: hue-rotate(180deg) brightness(0.9);
    }

    75% {
        transform: scale(1.02) rotate(0.5deg);
        filter: hue-rotate(270deg) brightness(1.05);
    }

    100% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(360deg) brightness(1);
    }
}

.flash-overlay.active {
    animation: flashPulse 0.15s ease-out;
}

@keyframes glitchEffect {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.heart-icon {
    color: #ff1744;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #5f6368;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Efeito de dissolver melhorado */
@keyframes dissolve {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9) rotate(2deg);
        filter: brightness(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(0.7) rotate(-2deg);
        filter: brightness(0.8);
    }
}

.dissolving {
    animation: dissolve 0.8s ease-out forwards;
    pointer-events: none;
}

/* Efeito de digitação sem cursor */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(20, end);
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Efeito de apagar e reescrever - REMOVIDO para animação mais rápida */

/* Estilo para redes transformadas - REMOVIDO para manter visual normal */
.network-item.transformed {
    /* Mantém o visual normal, apenas com a palavra mágica aplicada */
}

/* Efeito de pulsação para transformação */
@keyframes networkPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.network-pulsing {
    animation: networkPulse 0.6s ease-out;
}

/* Modal de seleção da palavra mágica */
.magic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.magic-modal.active {
    display: flex;
}

.magic-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.magic-title {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 16px;
    text-align: center;
}

.magic-input-container {
    position: relative;
    margin-bottom: 16px;
}

.magic-input {
    width: 100%;
    padding: 12px;
    padding-right: 40px;
    border: 2px solid #e8eaed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.magic-input:focus {
    outline: none;
    border-color: #4285f4;
}

.magic-input[rows] {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Rename Modal Styling */
.rename-inputs-container {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
}

.rename-input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rename-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    min-width: 60px;
    text-align: right;
}

.rename-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rename-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.rename-input::placeholder {
    color: #9aa0a6;
}

.magic-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magic-clear-btn:hover {
    background-color: #f1f3f4;
    color: #202124;
}

.magic-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.magic-card {
    aspect-ratio: 1;
    border: 2px solid #e8eaed;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    background: white;
}

.magic-card:hover {
    border-color: #4285f4;
    transform: scale(1.05);
}

.magic-card.selected {
    border-color: #4285f4;
    background: #4285f4;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.magic-buttons {
    display: flex;
    gap: 12px;
}

.magic-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.magic-btn-primary {
    background: #4285f4;
    color: white;
}

.magic-btn-primary:hover {
    background: #3367d6;
}

.magic-btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.magic-btn-secondary:hover {
    background: #e8eaed;
}

.magic-btn-warning {
    background: #ff9800;
    color: white;
}

.magic-btn-info {
    background: #2196f3;
    color: white;
}

.magic-btn-warning:hover {
    background: #f57c00;
}

/* Suítes de cartas */
.card-spades {
    color: #000;
}

.card-hearts {
    color: #e74c3c;
}

.card-diamonds {
    color: #e74c3c;
}

.card-clubs {
    color: #000;
}

/* Estilo para emojis de cartas */
.magic-card {
    font-size: 18px;
}

.magic-card:has(emoji) {
    font-size: 20px;
}

/* Estilos para o modal de configuração */
.config-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8eaed;
}

.config-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.config-tab:hover {
    color: #4285f4;
    background-color: #f8f9fa;
}

.config-tab.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
    background-color: #f8f9fa;
}

.config-content {
    position: relative;
}

.config-panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.config-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo para o ícone de WiFi clicável */
.wifi-icon {
    font-size: 24px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s;
}

.wifi-icon:hover {
    color: #4285f4;
    transform: scale(1.1);
}

/* Melhorias no modal de configuração */
.config-panel .rename-inputs-container {
    max-height: 250px;
    overflow-y: auto;
    margin: 15px 0;
    padding-right: 8px;
}

.config-panel .rename-input-group {
    margin-bottom: 12px;
}

.config-panel .rename-input-group label {
    min-width: 70px;
    font-weight: 500;
}

/* Sistema de Toaster */
.toaster-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: #323232;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: #4caf50;
    border-left: 4px solid #2e7d32;
}

.toast.error {
    background: #f44336;
    border-left: 4px solid #c62828;
}

.toast.info {
    background: #2196f3;
    border-left: 4px solid #1565c0;
}

.toast.warning {
    background: #ff9800;
    border-left: 4px solid #e65100;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

/* Animação de entrada e saída */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.slide-in {
    animation: toastSlideIn 0.3s ease forwards;
}

.toast.slide-out {
    animation: toastSlideOut 0.3s ease forwards;
}

/* Níveis de Sinal WiFi - Estilo Android Antigo */
.signal-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signal-wifi {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

/* Níveis de sinal usando imagens PNG */
.signal-wifi-1 {
    background-image: url('assets/wifi_signal_1.png');
}

.signal-wifi-2 {
    background-image: url('assets/wifi_signal_2.png');
}

.signal-wifi-3 {
    background-image: url('assets/wifi_signal_3.png');
}

.signal-wifi-4 {
    background-image: url('assets/wifi_signal_4.png');
}

/* Animação de pulsação para sinal forte */
@keyframes signalPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.signal-animated {
    animation: signalPulse 2s ease-in-out infinite;
}

/* Estilos para o modal de configuração */
.config-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e8eaed;
}

.config-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.config-tab.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
}

.config-tab:hover {
    background: #f8f9fa;
}

.config-panel {
    display: none;
}

.config-panel.active {
    display: block;
}

/* Estilos para adicionar/remover redes */
.add-network-section {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
}

.remove-network-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.3s ease;
}

.remove-network-btn:hover {
    background: #c82333;
}

.rename-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.rename-input-group label {
    min-width: 80px;
    margin-right: 10px;
    color: #5f6368;
    font-weight: 500;
}

.rename-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.rename-input-group input:focus {
    outline: none;
    border-color: #4285f4;
}

/* Toggle Switch para Reconhecimento de Gestos */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .3s ease;
    border-radius: 24px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* Toggle específico para configurações de gestos - ainda menor */
.rename-input-group .toggle-switch {
    width: 36px;
    height: 20px;
}

.rename-input-group .toggle-slider {
    border-radius: 20px;
}

.rename-input-group .toggle-slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}

.rename-input-group input:checked+.toggle-slider:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 14px;
    color: #5f6368;
    font-weight: 500;
}

.gesture-info {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #4285f4;
    grid-column: 1 / -1;
}

.gesture-info small {
    color: #666;
    line-height: 1.4;
    font-size: 12px;
}

/* Ícone WiFi pulsante durante reconhecimento de gestos */
.wifi-icon.wifi-pulsing {
    animation: wifiPulse 1s ease-in-out infinite;
}

@keyframes wifiPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Estilos para informações de input */
.input-info {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    font-style: italic;
}

/* Ajuste para inputs numéricos */
.rename-input[type="number"] {
    width: 80px;
    text-align: center;
}

/* Animação para transformação mágica */
@keyframes magicTransform {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.2) hue-rotate(180deg);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Animação de pulso para redes durante invasão */
@keyframes networkPulse {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.08);
    }

    50% {
        transform: scale(1.15);
    }

    75% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* Animação de pulso mais radical para primeiras redes invadidas */
@keyframes networkPulseRadical {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.12);
    }

    50% {
        transform: scale(1.25);
    }

    75% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

/* Estilos para modo offline - REMOVIDO para melhor experiência mágica */



/* Melhorias para PWA */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .header {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}

/* Estilos para instalação PWA */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: installSlideUp 0.5s ease-out;
}

@keyframes installSlideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.install-prompt button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.install-prompt button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Melhorias para cache e atualizações */
.cache-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    z-index: 9998;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.cache-status:hover {
    opacity: 1;
}

/* Estilos para gestos de invasão */
.invasion-mode {
    animation: invasionGlow 0.5s ease-in-out;
}

@keyframes invasionGlow {
    0% {
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }
}

.force-update-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 20px auto;
    padding: 14px;
    background: linear-gradient(135deg, #007aff, #00c6ff);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.force-update-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    filter: brightness(1.1);
}

.force-update-btn:active {
    transform: translateY(0);
}

#installPWA {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 10px 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

#installPWA:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

#installPWA .network-name {
    color: #007aff;
    font-weight: 700;
    font-size: 16px;
}

#installPWA .signal-icon i {
    color: #007aff;
    font-size: 20px;
}

button:hover .spin-hover {
    transform: rotate(180deg);
}