* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #f0f4fa;
    color: #1a1a2e;
    transition: background 0.4s ease, color 0.3s;
    overflow-x: hidden;
}

/* CANVAS - TEMA CLARO (padrão) */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(circle at 20% 30%, #eef2ff, #d9e0f0);
}

/* CARD 3D */
.card-3d {
    perspective: 1200px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.glass-card {
    background: rgba(245, 248, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    border-radius: 48px !important;
    border: 1px solid rgba(0, 120, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.3s;
    transform-style: preserve-3d;
    color: #1a1a2e;
}

.glass-card:hover {
    transform: rotateX(2deg) rotateY(1deg) translateY(-8px);
    box-shadow: 0 30px 55px rgba(0, 100, 200, 0.2);
}

/* INPUTS */
.futuristic-input, .futuristic-select {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #0a58ca !important;
    color: #111 !important;
    border-radius: 28px !important;
    padding: 12px 18px !important;
    transition: all 0.2s ease;
    box-shadow: 0 0 5px rgba(10, 88, 202, 0.2);
}

.futuristic-input::placeholder {
    color: #6c757d !important;
}

.futuristic-input:focus, .futuristic-select:focus {
    outline: none;
    border-color: #0ff !important;
    box-shadow: 0 0 15px #0ff, 0 0 5px cyan;
    transform: scale(1.01);
}

/* Botão enviar */
.btn-send {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    font-size: 1.2rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-send::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-send:hover::before {
    left: 100%;
}

.btn-send:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 25px #25D366, 0 10px 20px rgba(0,0,0,0.2);
    animation: pulse-glow 1.2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Botão tema */
.btn-outline-theme {
    background: transparent;
    border: 1.5px solid #0a58ca;
    color: #0a58ca;
    transition: 0.2s;
}
.btn-outline-theme:hover {
    background: #0a58ca;
    color: white;
    box-shadow: 0 0 15px #0a58ca;
    transform: scale(1.02);
}

/* Footer */
.glass-footer {
    background: rgba(200, 210, 240, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 32px;
    transition: all 0.2s;
}

.neon-title {
    text-shadow: 0 0 4px #0a58ca, 0 0 2px white;
    letter-spacing: -0.5px;
    color: #0a2f6c;
}

.glow-link {
    color: #0a58ca;
    transition: 0.2s;
}
.glow-link:hover {
    text-shadow: 0 0 6px #0a58ca;
    color: #0a2f6c;
}

/* Lista de histórico geral */
.list-group-item {
    background-color: rgba(0, 0, 0, 0.03) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}
.list-group-item span {
    cursor: pointer;
}

/* ========== MODO ESCURO ========== */
body.dark {
    background: #0e1625 !important;
    color: #eef2ff !important;
}

body.dark #bgCanvas {
    background: radial-gradient(circle at 20% 30%, #0e1625, #030b17) !important;
}

body.dark .glass-card {
    background: rgba(20, 28, 45, 0.85) !important;
    border-color: rgba(0, 200, 210, 0.4) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 200, 255, 0.2) !important;
    color: #eef2ff !important;
}

body.dark .futuristic-input,
body.dark .futuristic-select {
    background: rgba(0, 0, 0, 0.6) !important;
    border-color: #2a9d8f !important;
    color: #f5f5f5 !important;
}
body.dark .futuristic-input::placeholder {
    color: #aaa !important;
}
body.dark .futuristic-input:focus,
body.dark .futuristic-select:focus {
    border-color: #0ff !important;
    box-shadow: 0 0 12px #0ff;
}

body.dark .btn-outline-theme {
    border-color: cyan;
    color: cyan;
}
body.dark .btn-outline-theme:hover {
    background: cyan;
    color: black;
    box-shadow: 0 0 15px cyan;
}

body.dark .glass-footer {
    background: rgba(0, 0, 0, 0.5) !important;
}

body.dark .neon-title {
    text-shadow: 0 0 8px cyan, 0 0 2px white;
    color: white;
}

body.dark .glow-link {
    color: #0ff;
}
body.dark .glow-link:hover {
    text-shadow: 0 0 6px cyan;
    color: white;
}

body.dark .list-group-item {
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: #ddd !important;
    border-bottom-color: rgba(0, 255, 255, 0.2) !important;
}

body.dark .text-muted {
    color: #bbbbbb !important;
}

body.dark .btn-outline-danger {
    color: #ff7b72;
    border-color: #ff7b72;
}
body.dark .btn-outline-danger:hover {
    background: #ff7b72;
    color: black;
}

/* Modal no escuro */
body.dark .modal-content {
    background: rgba(20, 28, 45, 0.95) !important;
}
body.dark .nav-tabs .nav-link {
    color: #ccc;
}
body.dark .nav-tabs .nav-link.active {
    background: transparent;
    color: cyan;
    border-color: cyan;
}
body.dark .btn-close {
    filter: invert(1);
}