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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --bg-hover: #2a2a2a;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #6b6b6b;
    --border-color: #2a2a2a;
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

/* Gráficos de trading no background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Linhas de tendência ascendente */
        linear-gradient(135deg, transparent 0%, rgba(0, 212, 255, 0.08) 20%, transparent 40%),
        linear-gradient(135deg, transparent 10%, rgba(124, 58, 237, 0.06) 30%, transparent 50%),
        /* Linhas de tendência descendente */
        linear-gradient(225deg, transparent 0%, rgba(0, 212, 255, 0.05) 25%, transparent 45%),
        /* Padrão de candles/velas */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 212, 255, 0.03) 2px,
            rgba(0, 212, 255, 0.03) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(124, 58, 237, 0.02) 3px,
            rgba(124, 58, 237, 0.02) 6px
        );
    background-size: 
        200% 200%,
        180% 180%,
        220% 220%,
        40px 40px,
        40px 40px;
    background-position: 
        0% 0%,
        20% 20%,
        80% 80%,
        0 0,
        0 0;
    animation: tradingChartMove 30s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

@keyframes tradingChartMove {
    0%, 100% { 
        background-position: 
            0% 0%,
            20% 20%,
            80% 80%,
            0 0,
            0 0;
    }
    50% { 
        background-position: 
            100% 100%,
            80% 80%,
            20% 20%,
            20px 20px,
            20px 20px;
    }
}

/* Efeito de partículas no fundo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 212, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(124, 58, 237, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleMove {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
    50% { background-position: 100% 0%, 0% 100%, 50% 50%; }
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
    padding-bottom: max(30px, env(safe-area-inset-bottom, 30px));
    position: relative;
    z-index: 1;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Header */
header {
    position: relative;
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0 30px;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: var(--shadow-glow);
}

.logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    width: 80px;
    height: 80px;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 212, 255, 0.4));
    object-fit: contain;
    display: block;
    background: transparent;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    animation: fadeInDown 0.6s ease;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--accent-primary);
    border-right: 4px solid var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--shadow-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-size: 16px;
}

.hidden {
    display: none !important;
}

/* Steps */
.step {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step {
    position: relative;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.back-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateX(-3px);
}

.back-btn:active {
    transform: translateX(-1px);
}

.back-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.step h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Brokers Grid */
.brokers-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.broker-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 15px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    letter-spacing: 0.5px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.broker-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 0;
}

.broker-btn:hover::before {
    left: 0;
    opacity: 0.15;
}

.broker-btn:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        var(--shadow-glow);
    background: var(--bg-hover);
}

.broker-btn:active {
    transform: translateY(-2px) scale(1);
}

.broker-btn span {
    position: relative;
    z-index: 1;
}

/* Analysis Options */
.analysis-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.analysis-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 35px 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.analysis-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.analysis-btn:hover::before {
    opacity: 0.1;
}

.analysis-btn:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.6),
        var(--shadow-glow);
    background: var(--bg-hover);
}

.analysis-btn:active {
    transform: translateY(-4px);
}

.analysis-btn .icon {
    font-size: 64px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 212, 255, 0.3));
    animation: iconFloat 3s ease-in-out infinite;
}

.analysis-btn:nth-child(2) .icon {
    animation-delay: 0.5s;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.analysis-btn h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.analysis-btn p {
    font-size: 15px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.analysis-btn:hover p {
    color: var(--text-primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Debug mode (fora do Telegram) */
body:not(.telegram-web-app) {
    background: var(--bg-primary);
}

body:not(.telegram-web-app) .container {
    background: transparent;
}

/* Animações de entrada */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.broker-btn {
    animation: slideIn 0.5s ease backwards;
}

.broker-btn:nth-child(1) { animation-delay: 0.1s; }
.broker-btn:nth-child(2) { animation-delay: 0.2s; }
.broker-btn:nth-child(3) { animation-delay: 0.3s; }
.broker-btn:nth-child(4) { animation-delay: 0.4s; }
.broker-btn:nth-child(5) { animation-delay: 0.5s; }
.broker-btn:nth-child(6) { animation-delay: 0.6s; }
.broker-btn:nth-child(7) { animation-delay: 0.7s; }
.broker-btn:nth-child(8) { animation-delay: 0.8s; }
.broker-btn:nth-child(9) { animation-delay: 0.9s; }
.broker-btn:nth-child(10) { animation-delay: 1.0s; }
.broker-btn:nth-child(11) { animation-delay: 1.1s; }
.broker-btn:nth-child(12) { animation-delay: 1.2s; }

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Mobile First - 100% focado em celular */
@media (max-width: 1023px) {
    .container {
        padding: 20px 15px;
        max-width: 100%;
    }
}

header {
    padding: 30px 0 25px;
    margin-bottom: 40px;
}

.logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    display: block;
}

h1 {
    font-size: 36px;
}

.back-btn {
    padding: 10px 18px;
    font-size: 14px;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 15px;
}

.step h2 {
    font-size: 24px;
    margin-bottom: 25px;
}

/* Grid de corretoras - centralizado no mobile */
.brokers-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.broker-btn {
    padding: 22px 12px;
    font-size: 14px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Botões de análise - otimizados para touch */
.analysis-options {
    gap: 20px;
}

.analysis-btn {
    padding: 30px 20px;
    min-height: 180px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.analysis-btn .icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.analysis-btn h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.analysis-btn p {
    font-size: 14px;
    line-height: 1.5;
}

/* Melhorar área de toque */
button, .broker-btn, .analysis-btn {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 212, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
}

/* Safe area para iPhone X e superiores */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Otimizações para telas pequenas */
@media (max-width: 480px) {
    h1 {
        font-size: 32px;
    }
    
    .step h2 {
        font-size: 22px;
    }
    
    .broker-btn {
        padding: 20px 10px;
        font-size: 13px;
        min-height: 65px;
    }
    
    .analysis-btn {
        padding: 25px 18px;
        min-height: 170px;
    }
    
    .analysis-btn .icon {
        font-size: 48px;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 20px 0 15px;
        margin-bottom: 25px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .brokers-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }
    
    .broker-btn {
        padding: 15px 10px;
        min-height: 60px;
        max-width: 280px;
        width: 100%;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Timeframe Buttons */
.timeframe-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.timeframe-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.timeframe-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.timeframe-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Market Buttons */
.market-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.market-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.market-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.market-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Input Field */
.input-field {
    width: 100%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 18px;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

/* Primary Button */
.btn-primary {
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 212, 255, 0.4),
        var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Signal Result */
.signal-result {
    text-align: center;
    padding: 20px 0;
}

.signal-info {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-item .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-item .value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

/* Chart Container */
.chart-container {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.chart-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Monitoring Message */
.monitoring-message {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.monitoring-message p {
    color: var(--text-secondary);
    margin: 5px 0;
}

/* Signal Result Final */
.signal-result-final {
    text-align: center;
    padding: 20px 0;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* No Opportunity */
.no-opportunity {
    text-align: center;
    padding: 40px 20px;
}

.no-opportunity h2 {
    color: var(--text-primary);
    margin: 20px 0;
}

/* Progress Message */
.progress-message {
    color: var(--text-primary);
    font-size: 16px;
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease, pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.progress-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
        border-color: var(--border-color);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 212, 255, 0.4);
        border-color: rgba(0, 212, 255, 0.5);
    }
}

/* Animação de typing para mensagens */
.progress-message.typing {
    animation: fadeInUp 0.5s ease, pulseGlow 2s ease-in-out infinite, typing 0.5s ease;
}

@keyframes typing {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner animado */
.progress-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.progress-text {
    display: inline-block;
    vertical-align: middle;
}

/* Barra de progresso */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========== ESTATÍSTICAS DO SISTEMA ========== */
.stats-section {
    margin-top: 40px;
    padding: 0 10px;
}

/* Container das estatísticas - Grid de 3 colunas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 30px;
    padding: 0 10px;
}

/* Card individual */
.stat-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 16px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Efeito de hover no card */
.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.3), 0 0 20px rgba(124, 58, 237, 0.2);
}

/* Ícone do card */
.stat-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
    animation: floatIcon 3s ease-in-out infinite;
}

/* Animação do ícone flutuante */
@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
    }
}

/* Conteúdo do card (label + valor) */
.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Label da estatística */
.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    opacity: 0.8;
}

/* Valor da estatística */
.stat-value {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    transition: all 0.3s ease;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    letter-spacing: 0.5px;
}

/* Efeito de hover no valor */
.stat-card:hover .stat-value {
    transform: scale(1.05);
}

/* Responsividade para mobile */
@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-icon {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 18px;
    }
}

/* ========== RANKING DE USUÁRIOS E ATIVOS ========== */
.ranking-section {
    margin-top: 40px;
    padding: 0 10px;
}

.ranking-container {
    margin-top: 20px;
    padding: 0 10px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card de item no ranking */
.ranking-item {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.ranking-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25), 0 0 16px rgba(124, 58, 237, 0.15);
}

/* Posição no ranking */
.ranking-position {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 40px;
    text-align: center;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

/* Conteúdo do item */
.ranking-user-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* Permite que flex items encolham */
    overflow: hidden;
}

.ranking-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.3;
}

.ranking-user-stats {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ranking-user-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Taxa de acerto (destaque) */
.ranking-win-rate {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: right;
    min-width: 70px;
    flex-shrink: 0;
    white-space: nowrap;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

/* Estado de loading */
.ranking-loading {
    padding: 40px 20px;
    text-align: center;
}

/* Responsividade para mobile */
@media (max-width: 480px) {
    .ranking-item {
        padding: 12px 10px;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ranking-position {
        font-size: 18px;
        min-width: 28px;
        flex-shrink: 0;
        padding-top: 2px;
    }
    
    .ranking-user-content {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    
    .ranking-user-name {
        font-size: 13px;
        line-height: 1.3;
        word-break: break-word;
        overflow-wrap: break-word;
        margin-bottom: 4px;
    }
    
    .ranking-user-stats {
        font-size: 10px;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 4px;
    }
    
    .ranking-user-stat {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .ranking-user-stat span {
        white-space: nowrap;
    }
    
    .ranking-win-rate {
        font-size: 16px;
        min-width: 50px;
        flex-shrink: 0;
        text-align: right;
        padding-top: 2px;
    }
}

/* ========== NOTIFICAÇÕES DE VITÓRIAS ========== */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 350px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.notification {
    background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4), 0 0 20px rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: progressBar 5s linear forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.notification-content {
    flex: 1;
    color: white;
    min-width: 0;
}

.notification-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    word-break: break-word;
}

.notification-details {
    font-size: 12px;
    opacity: 0.95;
    line-height: 1.3;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.notification-close:active {
    transform: scale(0.95);
}

.notification.hiding {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsividade para mobile */
@media (max-width: 480px) {
    .notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
    
    .notification {
        padding: 14px 16px;
    }
    
    .notification-icon {
        font-size: 24px;
    }
    
    .notification-text {
        font-size: 13px;
    }
    
    .notification-details {
        font-size: 11px;
    }
}

/* ========== ENQUADRAMENTO TABLET PARA DESKTOP ========== */
/* Garantir que em telas desktop o layout fique enquadrado em 768px */
@media (min-width: 1024px) {
    .container {
        max-width: 768px !important;
        margin: 0 auto;
        padding: 30px 20px;
    }
}
