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

:root {
    --neon-green: #00ff41;
    --neon-red: #ff0040;
    --neon-blue: #00d4ff;
    --neon-purple: #ff00ff;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --panel-bg: rgba(15, 15, 15, 0.95);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --success: var(--neon-green);
    --danger: var(--neon-red);
    --warning: #ffaa00;
    --glow-sm: 0 0 10px;
    --glow-md: 0 0 20px;
    --glow-lg: 0 0 30px;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(0deg, transparent 24%, rgba(0, 255, 65, 0.015) 25%, rgba(0, 255, 65, 0.015) 26%, transparent 27%),
        repeating-linear-gradient(90deg, transparent 24%, rgba(0, 212, 255, 0.015) 25%, rgba(0, 212, 255, 0.015) 26%, transparent 27%);
    background-size: 60px 60px;
    z-index: -2;
    animation: matrix-drift 40s linear infinite;
}

@keyframes matrix-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.008) 2px, rgba(255, 255, 255, 0.008) 4px);
    z-index: -1;
    pointer-events: none;
    animation: scan-effect 6s infinite;
}

@keyframes scan-effect {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.glitch {
    position: relative;
    text-shadow: var(--glow-sm) var(--neon-blue);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-offset-1 1.2s infinite;
    color: var(--neon-green);
    z-index: -1;
}

.glitch::after {
    animation: glitch-offset-2 1.2s infinite;
    color: var(--neon-red);
    z-index: -2;
}

@keyframes glitch-offset-1 {
    0%, 96%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    98% { clip-path: inset(30% 0 40% 0); transform: translate(-1px); }
}

@keyframes glitch-offset-2 {
    0%, 96%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    98% { clip-path: inset(70% 0 20% 0); transform: translate(1px); }
}

.main-header {
    padding: 1rem 2rem;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.logo-container {
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
}

.tagline {
    font-size: 0.8rem;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.trading-app {
    padding-top: 85px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.trading-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1800px;
    margin: 1rem auto;
    width: calc(100% - 2rem);
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    height: calc(100vh - 105px); /* Ajuste baseado no header + margens */
}

.trading-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
    min-height: 70px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.symbol-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trading-symbol {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: var(--glow-sm) var(--neon-blue);
}

.timeframe {
    background: rgba(0, 212, 255, 0.15);
    color: var(--neon-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--neon-blue);
    font-weight: 600;
}

.price-ticker {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.current-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--success);
    text-shadow: var(--glow-sm) var(--success);
}

.price-change {
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.price-change.positive {
    background: rgba(0, 255, 65, 0.15);
    color: var(--success);
}

.price-change.negative {
    background: rgba(255, 0, 64, 0.15);
    color: var(--danger);
}

.toolbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.trade-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.trade-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid;
    border-radius: 6px;
    background: transparent;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.trade-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.3s;
    z-index: -1;
}

.long-btn {
    border-color: var(--success);
    color: var(--success);
}

.long-btn::before {
    background: var(--success);
}

.long-btn:hover {
    color: var(--dark-bg);
    box-shadow: var(--glow-md) var(--success);
    transform: translateY(-1px);
}

.long-btn:hover::before {
    left: 0;
}

.short-btn {
    border-color: var(--danger);
    color: var(--danger);
}

.short-btn::before {
    background: var(--danger);
}

.short-btn:hover {
    color: var(--dark-bg);
    box-shadow: var(--glow-md) var(--danger);
    transform: translateY(-1px);
}

.short-btn:hover::before {
    left: 0;
}

.close-btn {
    padding: 0.8rem 1.2rem;
    background: var(--warning);
    color: var(--dark-bg);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    opacity: 0.5;
}

.close-btn:not(:disabled) {
    opacity: 1;
    animation: pulse-glow 2s infinite;
}

.close-btn:not(:disabled):hover {
    background: #ffcc33;
    transform: translateY(-1px);
    box-shadow: var(--glow-md) var(--warning);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: var(--glow-sm) var(--warning); }
    50% { box-shadow: var(--glow-md) var(--warning); }
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-text {
    font-size: 0.85rem;
}

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

.account-info {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
}

.trading-workspace {
    display: flex;
    flex: 1;
    min-height: 0;
}

.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.chart-controls {
    display: flex;
    gap: 1.5rem;
}

.leverage-display,
.volume-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.leverage-display span,
.volume-display span {
    color: var(--text-primary);
    font-weight: 600;
}

.position-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-text.active {
    color: var(--success);
    font-weight: 600;
}

.status-text.danger {
    color: var(--danger);
    font-weight: 600;
    animation: blink 1s infinite;
}

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

.chart-container {
    flex: 1;
    position: relative;
    background: var(--darker-bg);
    border-radius: 4px;
    margin: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

#price-chart {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.info-panel {
    width: 320px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
}

.panel-section {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
}

.panel-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.value.long {
    color: var(--success);
}

.value.short {
    color: var(--danger);
}

.value.danger {
    color: var(--danger);
}

.pnl-section {
    text-align: center;
}

.pnl-display {
    margin-bottom: 1rem;
}

.pnl-percentage {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    transition: all 0.3s;
}

.pnl-percentage.profit {
    color: var(--success);
    text-shadow: var(--glow-sm) var(--success);
}

.pnl-percentage.loss {
    color: var(--danger);
    text-shadow: var(--glow-sm) var(--danger);
}

.pnl-amount {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pnl-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.pnl-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 4px;
}

.pnl-fill.profit {
    background: linear-gradient(90deg, var(--success), #66ff66);
}

.pnl-fill.loss {
    background: linear-gradient(90deg, var(--danger), #ff6666);
}

.market-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-val {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.target-section {
    text-align: center;
}

.target-display {
    margin-bottom: 1rem;
}

.target-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: var(--glow-sm) var(--neon-blue);
    margin-bottom: 0.3rem;
}

.target-goal {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.target-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.target-fill {
    height: 100%;
    width: 10%;
    background: linear-gradient(90deg, var(--neon-blue), #66ccff);
    transition: all 0.5s ease;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.target-percentage {
    font-size: 0.8rem;
    color: var(--neon-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

.whitelist-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.achievement-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(0, 212, 255, 0.1));
    border: 1px solid var(--success);
    border-radius: 8px;
    animation: achievement-glow 2s ease-in-out infinite;
}

@keyframes achievement-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    }
}

.achievement-icon {
    font-size: 1.4rem;
    animation: achievement-bounce 1s ease-in-out infinite;
}

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

.achievement-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.whitelist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--neon-purple), #ff33ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
}

.whitelist-btn:hover {
    background: linear-gradient(135deg, #ff33ff, var(--neon-purple));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 255, 0.5);
}

.whitelist-btn .btn-icon {
    font-size: 1.1rem;
}

.trade-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-result-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--panel-bg);
    border: 3px solid var(--neon-purple);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    box-shadow: var(--glow-lg) var(--neon-purple), 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: modal-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    backdrop-filter: blur(20px);
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modal-exit {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: icon-bounce 0.6s ease-out 0.2s both;
}

@keyframes icon-bounce {
    from {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.result-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    animation: title-glow 0.5s ease-out 0.3s both;
}

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

.result-title.win {
    color: var(--success);
    text-shadow: var(--glow-md) var(--success);
}

.result-title.lose {
    color: var(--danger);
    text-shadow: var(--glow-md) var(--danger);
}

.result-message {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-style: italic;
    animation: message-fade-in 0.5s ease-out 0.4s both;
}

@keyframes message-fade-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    animation: card-slide-up 0.5s ease-out calc(0.5s + var(--delay, 0s)) both;
}

.stat-card:nth-child(1) { --delay: 0s; }
.stat-card:nth-child(2) { --delay: 0.1s; }

@keyframes card-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: var(--glow-sm) var(--neon-blue);
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.result-actions {
    margin-bottom: 1rem;
    animation: actions-fade-in 0.5s ease-out 0.8s both;
}

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

.new-trade-btn {
    background: linear-gradient(135deg, var(--neon-purple), #ff33ff);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(255, 0, 255, 0.3);
}

.new-trade-btn:hover {
    background: linear-gradient(135deg, #ff33ff, var(--neon-purple));
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 0, 255, 0.5);
}

.new-trade-btn .btn-icon {
    font-size: 1.2rem;
    animation: rocket-pulse 2s ease-in-out infinite;
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.notification-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.event-notifications {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.event-notification {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.95), rgba(200, 0, 0, 0.95));
    color: white;
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
    font-family: 'Press Start 2P', cursive;
    border: 3px solid white;
    border-radius: 15px;
    text-align: center;
    animation: event-dramatic 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.5), 0 0 50px rgba(255, 0, 0, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.event-notification::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: event-shine 0.6s ease-out;
}

@keyframes event-dramatic {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

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

.toast-notifications {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 350px;
}

.toast-notification {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--neon-blue);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: toast-slide-in 0.4s ease-out;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s;
}

.toast-notification:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.toast-notification.success {
    border-left-color: var(--success);
}

.toast-notification.error {
    border-left-color: var(--danger);
}

.toast-notification.warning {
    border-left-color: var(--warning);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-fade-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes event-fade-out {
    from {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    to {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.near-liquidation {
    animation: danger-pulse 1.2s ease-in-out infinite;
}

@keyframes danger-pulse {
    0%, 100% { 
        border-color: var(--border-color);
        background: var(--panel-bg);
    }
    50% { 
        border-color: var(--danger);
        background: rgba(255, 0, 64, 0.05);
        box-shadow: 0 0 20px rgba(255, 0, 64, 0.3);
    }
}

@media (max-width: 1400px) {
    .info-panel {
        width: 280px;
    }
    
    .panel-section {
        padding: 0.8rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

@media (max-width: 1200px) {
    .trading-workspace {
        flex-direction: column;
    }
    
    .chart-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-height: 400px;
    }
    
    .info-panel {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        min-height: 180px;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .panel-section {
        min-width: 220px;
        flex-shrink: 0;
    }
}

@media (max-width: 900px) {
    .trading-toolbar {
        flex-wrap: wrap;
        gap: 0.8rem;
        padding: 1rem;
    }
    
    .toolbar-left {
        flex: 1;
        min-width: 200px;
    }
    
    .toolbar-center {
        flex: 1;
        min-width: 250px;
    }
    
    .toolbar-right {
        flex: 1;
        min-width: 150px;
    }
    
    .symbol-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .price-ticker {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .trading-app {
        padding-top: 75px;
    }
    
    .trading-interface {
        height: calc(100vh - 95px);
        margin: 0.5rem auto;
        width: calc(100% - 1rem);
    }
    
    .main-header {
        padding: 0.8rem 1rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .trading-toolbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .toolbar-left,
    .toolbar-center,
    .toolbar-right {
        width: 100%;
        justify-content: center;
        flex: none;
    }
    
    .trade-actions {
        width: 100%;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .trade-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .close-btn {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }
    
    
    .chart-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
    
    .chart-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .info-panel {
        flex-direction: column;
        min-height: auto;
    }
    
    .panel-section {
        min-width: auto;
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
        padding: 1.5rem;
    }
    
    .result-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-title {
        font-size: 2rem;
    }
    
    .result-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .trading-app {
        padding-top: 65px;
    }
    
    .trading-interface {
        height: calc(100vh - 85px);
        margin: 0.3rem auto;
        width: calc(100% - 0.6rem);
    }
    
    .main-header {
        padding: 0.6rem 0.8rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .tagline {
        font-size: 0.7rem;
    }
    
    
    .trading-toolbar {
        padding: 0.8rem;
    }
    
    .trade-actions {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .trade-btn,
    .close-btn {
        width: 100%;
        padding: 0.8rem;
    }
    
    .account-info {
        gap: 1rem;
    }
    
    .current-price {
        font-size: 1.3rem;
    }
    
    .trading-symbol {
        font-size: 1.2rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        padding: 1rem;
    }
    
    .result-title {
        font-size: 1.6rem;
    }
    
    .result-icon {
        font-size: 2.5rem;
    }
    
    .new-trade-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Estilos para o Modal de Carteira */
.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease-out;
}

.wallet-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.wallet-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.wallet-modal-content {
    background: linear-gradient(135deg, var(--panel-bg), rgba(20, 20, 20, 0.98));
    border: 2px solid var(--neon-blue);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 
        0 20px 60px rgba(0, 212, 255, 0.3),
        0 0 80px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modal-scale-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-scale-in {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    margin-bottom: 0.5rem;
}

.modal-body {
    padding: 2rem;
}

.success-message {
    text-align: center;
    margin-bottom: 2rem;
}

.achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--neon-green), #00cc33);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 8px 25px rgba(0, 255, 65, 0.3);
    margin-bottom: 1rem;
    animation: badge-glow 2s ease-in-out infinite alternate;
}

@keyframes badge-glow {
    from { box-shadow: 0 8px 25px rgba(0, 255, 65, 0.3); }
    to { box-shadow: 0 8px 35px rgba(0, 255, 65, 0.6); }
}

.badge-icon {
    font-size: 1.1rem;
}

.congratulations {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.wallet-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

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

.input-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.challenge-question {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--neon-blue);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--neon-blue);
}

.form-stats {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-row .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neon-green);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cancel-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.submit-btn {
    flex: 2;
    background: linear-gradient(135deg, var(--neon-blue), #0099cc);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #0099cc, var(--neon-blue));
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.5);
}

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

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.success-feedback {
    text-align: center;
    padding: 2rem;
}

.success-feedback.hidden {
    display: none;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.success-feedback h3 {
    color: var(--neon-green);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.success-feedback p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.close-success-btn {
    background: linear-gradient(135deg, var(--neon-green), #00cc33);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.close-success-btn:hover {
    background: linear-gradient(135deg, #00cc33, var(--neon-green));
    transform: translateY(-2px);
}

/* Responsividade para o modal */
@media (max-width: 768px) {
    .wallet-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header, .modal-body {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .wallet-modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .modal-header, .modal-body {
        padding: 1rem;
    }
    
    .achievement-badge {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}