@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;700&display=swap');

:root {
    --toro-pink: #ff007f;
    --toro-pink-glow: rgba(255, 0, 127, 0.2);
    --toro-text-light: #ffffff;
    --toro-green: #28a745;
    --toro-red: #dc3545;
    --toro-orange: #fd7e14;
}

.toro-dapp-wrapper { width: 100%; max-width: 1300px; margin: 20px auto; font-family: 'Roboto', sans-serif; font-weight: 300; color: var(--toro-text-light); box-sizing: border-box; }
.toro-dapp-wrapper * { box-sizing: border-box; }
.toro-dapp-wrapper strong, .toro-dapp-wrapper h3, .toro-dapp-wrapper h4, .toro-dapp-wrapper .amount, .toro-dapp-wrapper .toro-btn { font-weight: 700; }

.toro-glass { background: rgba(30, 30, 30, 0.7); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); padding: 25px; width: 100%; height: 100%; display: flex; flex-direction: column; }

.toro-sim-warning { display: none; background: rgba(255, 152, 0, 0.2); color: #ff9800; border: 1px solid rgba(255, 152, 0, 0.4); font-weight: 700; padding: 12px; border-radius: 12px; text-align: center; margin-bottom: 20px; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }

.toro-network-badge { display: inline-flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.5); padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: bold; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.1); }
.toro-dot { min-width: 10px; width: 10px; height: 10px; border-radius: 50%; background: #ccc; box-shadow: 0 0 5px #ccc; }
.toro-dot.green { background: var(--toro-green); box-shadow: 0 0 8px var(--toro-green); }
.toro-dot.red { background: var(--toro-red); box-shadow: 0 0 8px var(--toro-red); }

.toro-hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; align-items: stretch; }
.toro-hero-box h4 { margin: 0 0 10px 0; font-size: 13px; text-transform: uppercase; opacity: 0.7; }
.toro-hero-box .amount { font-size: 26px; margin-bottom: 4px; line-height: 1.2; color: #fff; word-break: break-word; }
.toro-hero-box .usd { font-size: 15px; color: var(--toro-green); font-weight: 700; }
.toro-hero-box .toro-usd { color: var(--toro-pink); }
.toro-pnl-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 14px; }

.toro-trade-status { margin-top: auto; padding-top: 15px; border-top: 1px dashed rgba(255,255,255,0.2); font-size: 13px; display: none; }
.ts-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ts-trailing-box { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; background: rgba(0,0,0,0.4); padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.badge-inactive { background: #6c757d; color: white; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.badge-active { background: var(--toro-pink); color: white; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; box-shadow: 0 0 10px var(--toro-pink-glow); animation: pulseGlow 1.5s infinite; }
.ts-trailing-details { font-size: 12px; margin-top: 8px; color: #ff9800; background: rgba(255,152,0,0.1); padding: 8px; border-radius: 6px; border-left: 3px solid #ff9800; }
@keyframes pulseGlow { 0% { box-shadow: 0 0 5px var(--toro-pink); } 50% { box-shadow: 0 0 15px var(--toro-pink); } 100% { box-shadow: 0 0 5px var(--toro-pink); } }

/* VALUE UPDATE FLASH ANIMATION (Licht Wusch) */
.val-updated { position: relative; overflow: hidden; }
.val-updated::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-20deg);
    animation: flash-sweep 0.6s ease-out forwards;
}
@keyframes flash-sweep { 0% { left: -100%; } 100% { left: 200%; } }

/* BUTTON SHINE ANIMATION */
.shine-btn { position: relative; overflow: hidden; transition: all 0.3s ease; }
.shine-btn::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); 
    animation: shine-sweep 8s infinite; 
}
@keyframes shine-sweep { 0% { left: -100%; } 10% { left: 200%; } 100% { left: 200%; } }
.shine-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 25px var(--toro-pink-glow), 0 0 10px var(--toro-pink); border-color: var(--toro-pink); }

.toro-btn-small { display: inline-block; background: rgba(255,0,127,0.2); color: var(--toro-pink); border: 1px solid var(--toro-pink); padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: bold; text-decoration: none; transition: 0.2s; }
.toro-btn-small:hover { background: var(--toro-pink); color: #fff; }

.toro-buy-section { max-width: 800px; margin: 0 auto 40px auto; text-align: center; border: 2px solid var(--toro-pink); box-shadow: 0 8px 30px var(--toro-pink-glow); height: auto; display: block; }
.toro-buy-section h3 { margin-top: 0; font-size: 24px; margin-bottom: 25px; color: #fff; }
.toro-input-wrapper { position: relative; margin-bottom: 20px; }
.toro-input-inner { position: relative; max-width: 400px; margin: 0 auto; width: 100%; }
.toro-input-inner input[type=number]::-webkit-inner-spin-button, .toro-input-inner input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.toro-input-inner input[type=number] { -moz-appearance: textfield; width: 100%; padding: 20px 70px 20px 20px; font-size: 24px; font-weight: 700; text-align: center; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.6); color: #fff; }
.toro-input-inner input:focus { border-color: var(--toro-pink); outline: none; box-shadow: 0 0 15px var(--toro-pink-glow); }
.toro-input-suffix { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 700; color: var(--toro-pink); }
.toro-usd-preview { font-size: 16px; color: #ccc; margin-top: 15px; background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px; }
.toro-preview-highlight { color: var(--toro-pink); font-size: 22px; font-weight: 700; display: block; margin: 5px 0; }
.toro-preview-usd { color: var(--toro-green); font-weight: 700; }
.toro-preview-gas { color: #ff9800; font-size: 13px; margin-bottom: 5px; display: block; }
.toro-wallet-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; width: 100%; }
.toro-btn { flex: 1; min-width: 250px; max-width: 400px; padding: 16px; font-size: 16px; font-family: 'Roboto', sans-serif; border: none; border-radius: 12px; cursor: pointer; color: #fff; font-weight: 700; }
.btn-web3 { background: linear-gradient(90deg, #F6851B, #181A20); border: 1px solid rgba(255,255,255,0.2); }
.toro-wallet-hint { font-size: 13px; color: #aaa; margin-top: 10px; font-weight: 300; }
.btn-buy { background: var(--toro-pink); display: none; width: 100%; margin: 25px auto 0 auto; max-width: 400px; font-size: 20px; padding: 20px; }
.toro-status { font-size: 15px; font-weight: 700; margin-top: 15px; color: #ccc; }

.toro-split-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; align-items: stretch; }
@media(min-width: 992px) { .toro-split-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
.toro-split-header { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
@media(min-width: 576px) { .toro-split-header { flex-direction: row; justify-content: space-between; align-items: center; } }
.toro-split-header h3 { margin: 0; font-size: 20px; color: #fff; }
.toro-sync-timer { font-family: monospace; font-size: 14px; background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 6px; color: var(--toro-pink); font-weight: bold; }

.bot-thinking-wrapper { position: relative; border-radius: 18px; overflow: hidden !important; padding: 3px; display: flex; flex-direction: column; width: 100%; height: 100%; }
.bot-thinking-wrapper::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, rgba(255, 0, 127, 0.8), transparent 25%);
    animation: bot-radar 6s linear infinite; 
    z-index: 0; pointer-events: none;
}
.bot-thinking-inner { position: relative; z-index: 1; flex: 1; background: rgba(30, 30, 30, 0.85); backdrop-filter: blur(15px); border-radius: 15px; padding: 25px; display: flex; flex-direction: column; box-sizing: border-box; }
@keyframes bot-radar { 100% { transform: rotate(360deg); } }

/* LISTEN HÖHE & SCROLLBALKEN */
.toro-trades-list { list-style: none; padding: 0; margin: 0; font-size: 14px; overflow-y: auto; padding-right: 10px; flex: 1;}
.toro-trades-list.list-protocol, .toro-trades-list.list-history { height: 240px; min-height: 240px; max-height: 240px; }
.toro-trades-list::-webkit-scrollbar { width: 8px; }
.toro-trades-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.toro-trades-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--toro-pink), var(--toro-orange)); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }

.toro-trades-list li { margin-bottom: 12px; padding: 12px 15px; border-radius: 8px; border-left: 4px solid #6c757d; background: rgba(255,255,255,0.05); }
.toro-trades-list li.action-BASE_ORDER { border-left-color: var(--toro-green); background: rgba(40,167,69,0.1); }
.toro-trades-list li.action-SAFETY_ORDER { border-left-color: #ffc107; background: rgba(255,193,7,0.1); }
.toro-trades-list li.action-TRAILING { border-left-color: var(--toro-pink); background: var(--toro-pink-glow); }
.toro-trades-list li.action-TAKE_PROFIT { border-left-color: var(--toro-red); background: rgba(220,53,69,0.1); }
.toro-trades-list li.action-BUYBACK { border-left-color: var(--toro-orange); background: rgba(253,126,20,0.1); } 

/* TX LINK BUTTON */
.tx-btn { display: inline-block; background: var(--toro-pink); color: #fff !important; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: bold; text-decoration: none; box-shadow: 0 0 8px var(--toro-pink-glow); transition: 0.2s; }
.tx-btn:hover { transform: translateY(-2px); box-shadow: 0 0 15px var(--toro-pink); }

.toro-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.toro-tab { background: rgba(255,255,255,0.1); border: none; font-weight: 700; opacity: 0.8; cursor: pointer; padding: 6px 12px; border-radius: 6px; color: #fff; flex: 1; text-align: center; }
.toro-tab.active { background: var(--toro-pink); opacity: 1; }
.toro-canvas-container { height: 600px; width: 100%; position: relative; }
.toro-chart-iframe { width: 100%; height: 500px; border: none; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); margin-top: 20px;}

@media (max-width: 768px) {
    .toro-glass { padding: 15px; }
    .bot-thinking-inner { padding: 15px; }
    .toro-hero-box .amount { font-size: 22px; }
    .toro-buy-section h3 { font-size: 20px; }
    .toro-input-inner input { font-size: 20px; padding: 15px 60px 15px 15px; }
    .toro-split-header h3 { font-size: 18px; }
    .toro-trades-list li { padding: 10px; font-size: 13px; }
    .toro-canvas-container { height: 400px; }
}