/* Modern Reset */
:root {
    --bg-dark: #0f1115;
    --bg-card: #181b21;
    --bg-sidebar: #131519;
    --primary: #ffd700;
    /* Gold */
    --primary-hover: #e6c200;
    --accent: #00d4ff;
    /* Tech Blue */
    --danger: #ff4757;
    --success: #2ed573;
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --border: #2a2e35;

    --purple-glow: rgba(138, 43, 226, 0.4);
    --gold-glow: rgba(255, 215, 0, 0.2);

    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    /* App-like feel */
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: width 0.3s ease;
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo .highlight {
    color: var(--primary);
}

.logo i {
    color: var(--success);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at top right, #1a1d24 0%, var(--bg-dark) 40%);
}

.top-bar {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background-color: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(10px);
}

.actions button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

#content-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Heatmap Grid (Volante) */
.lotofacil-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 350px;
    margin: 0 auto;
}

.loto-num {
    aspect-ratio: 1;
    background-color: #232730;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.loto-num.selected {
    background-color: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--gold-glow);
}

.loto-num.hot {
    border-color: var(--danger);
}

.loto-num.cold {
    border-color: var(--accent);
}

/* Analysis Results Premium */
.analysis-container {
    animation: slideUp 0.4s ease-out;
}

.score-gauge-container {
    position: relative;
    width: 200px;
    height: 100px;
    /* Half circle */
    overflow: hidden;
    margin: 0 auto 2rem;
}

.score-gauge {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(var(--danger) 0%, var(--primary) 50%, var(--success) 100%);
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    /* Start from left */
    mask: radial-gradient(transparent 65%, black 66%);
    -webkit-mask: radial-gradient(transparent 65%, black 66%);
}

.score-value {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    line-height: 1;
}

.score-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

/* Métrica Card Premium */
.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-bar-bg {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
}

.metric-msg {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Status Colors */
.status-good {
    color: var(--success);
}

.status-bad {
    color: var(--danger);
}

.status-warn {
    color: #f39c12;
}

/* Button Pulse Animation */
.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        height: 100%;
        z-index: 100;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    #content-area {
        padding: 1rem;
    }
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}