/* ============ SAMURAI AI - Web Signal Bot Styles ============ */

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

:root {
    --bg-dark: #0a0a12;
    --bg-card: rgba(20, 25, 40, 0.9);
    --bg-input: rgba(30, 35, 55, 0.8);
    --accent-blue: #2a7fff;
    --accent-red: #ff3b3b;
    --accent-green: #00d26a;
    --text-primary: #ffffff;
    --text-secondary: #8892a6;
    --border-color: rgba(100, 120, 180, 0.3);
    --glow-blue: rgba(42, 127, 255, 0.4);
    --glow-red: rgba(255, 59, 59, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ============ SPLASH SCREEN ============ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.splash-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(30, 80, 180, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(150, 30, 30, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a18 0%, #0d0d1a 100%);
}

.splash-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.splash-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(40, 50, 80, 0.8) 0%, rgba(30, 35, 50, 0.9) 100%);
    box-shadow: 
        0 0 60px rgba(42, 127, 255, 0.2),
        inset 0 0 40px rgba(42, 127, 255, 0.1);
    animation: pulse-circle 2s ease-in-out infinite;
}

@keyframes pulse-circle {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.splash-logo {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 2px;
    animation: fade-in-up 1s ease-out 0.5s both;
}

.logo-samurai {
    color: var(--text-primary);
}

.logo-ai {
    color: var(--accent-red);
}

.splash-loader {
    animation: fade-in 1s ease-out 1s both;
}

.loader-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============ MAIN APP ============ */
.main-app {
    min-height: 100vh;
    background: 
        radial-gradient(ellipse at 20% 10%, rgba(30, 80, 180, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 90%, rgba(150, 30, 30, 0.25) 0%, transparent 40%),
        linear-gradient(180deg, #0a0a18 0%, #0d0d1a 100%);
    padding-bottom: 80px;
}

/* Header */
.header {
    padding: 20px;
    text-align: center;
}

.header-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Controls Bar - 3D Style */
.controls-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 15px 15px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px 16px;
    font-size: 13px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.control-item:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.control-icon {
    font-size: 14px;
    opacity: 0.8;
}

.control-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.control-select option {
    background: var(--bg-dark);
}

/* Market Tabs - 3D Style */
.market-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 20px 15px;
}

.market-tabs-container {
    display: flex;
    background: #1a1a2e;
    border-radius: 30px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-btn {
    padding: 12px 35px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
    position: relative;
}

.tab-btn:first-child {
    border-radius: 25px;
}

.tab-btn:last-child {
    border-radius: 25px;
}

.tab-btn.active {
    background: linear-gradient(180deg, #4da3ff 0%, #2a7fff 50%, #1a6ce0 100%);
    color: white;
    box-shadow: 
        0 4px 15px rgba(42, 127, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tab-btn:not(.active) {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

.tab-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Signal Methods */
.signal-methods {
    padding: 0 20px 20px;
}

.methods-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.methods-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.method-btn {
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.method-btn.active {
    background: linear-gradient(180deg, rgba(42, 127, 255, 0.25) 0%, rgba(42, 127, 255, 0.15) 100%);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 
        0 4px 15px rgba(42, 127, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.method-btn:hover:not(.active) {
    transform: translateY(-1px);
    border-color: rgba(42, 127, 255, 0.5);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.method-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Indicator Dropdown - 3D Style */
.indicator-dropdown {
    margin-top: 10px;
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.indicator-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.indicator-item {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.indicator-item:hover {
    background: rgba(42, 127, 255, 0.1);
    border-color: var(--border-color);
}

.indicator-item.selected {
    background: rgba(42, 127, 255, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Signal Display - 3D Cards */
.signal-display {
    padding: 0 15px 15px;
}

.signal-card {
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.signal-card:last-child {
    margin-bottom: 0;
}

.signal-row {
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 15px 18px;
    margin-bottom: 10px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.signal-row:last-child {
    margin-bottom: 0;
}

.signal-row.two-col {
    display: flex;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.signal-col {
    flex: 1;
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 15px 18px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.signal-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.signal-value {
    font-size: 18px;
    font-weight: 600;
}

.signal-value.accuracy {
    color: var(--accent-green);
}

.signal-direction {
    display: flex;
    align-items: center;
    gap: 10px;
}

.direction-icon {
    font-size: 20px;
}

.direction-icon.up {
    color: var(--accent-green);
}

.direction-icon.down {
    color: var(--accent-red);
}

.direction-text {
    font-size: 16px;
    font-weight: 600;
}

.direction-text.up {
    color: var(--accent-green);
}

.direction-text.down {
    color: var(--accent-red);
}

.direction-expiry {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Progress Bar - 3D Style */
.progress-bar {
    height: 10px;
    background: linear-gradient(180deg, #1a1a2e 0%, #252538 100%);
    border-radius: 8px;
    margin: 12px 0;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 1px rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(180deg, #ff6b6b 0%, #ff3b3b 50%, #cc2020 100%);
    border-radius: 8px;
    width: 0%;
    transition: width 1s linear;
    box-shadow: 
        0 0 10px rgba(255, 59, 59, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.progress-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Action Buttons */
.action-buttons {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(180deg, #4da3ff 0%, #2a7fff 30%, #1a6ce0 70%, #0d5fd8 100%);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 8px 30px rgba(42, 127, 255, 0.5),
        0 4px 15px rgba(42, 127, 255, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50px 50px 100px 100px;
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(42, 127, 255, 0.6),
        0 6px 20px rgba(42, 127, 255, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 
        0 4px 15px rgba(42, 127, 255, 0.4),
        0 2px 8px rgba(42, 127, 255, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

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

.btn-secondary {
    background: linear-gradient(180deg, #ff6b6b 0%, #ff3b3b 30%, #e02020 70%, #c41818 100%);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 8px 30px rgba(255, 59, 59, 0.5),
        0 4px 15px rgba(255, 59, 59, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50px 50px 100px 100px;
    pointer-events: none;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(255, 59, 59, 0.6),
        0 6px 20px rgba(255, 59, 59, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 
        0 4px 15px rgba(255, 59, 59, 0.4),
        0 2px 8px rgba(255, 59, 59, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

/* Chart */
.chart-container {
    padding: 0 15px 15px;
    margin: 0;
}

#tradingview-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    height: 180px;
    overflow: hidden;
}

.chart-placeholder {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-line {
    width: 100%;
    height: 50px;
}

/* Bottom Navigation - 3D Style */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn.active {
    background: rgba(42, 127, 255, 0.15);
    border-color: var(--accent-blue);
    box-shadow: 
        0 0 15px rgba(42, 127, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.nav-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-icon {
    font-size: 20px;
    color: #6b7280;
}

.nav-btn.active .nav-icon {
    color: var(--accent-blue);
}

.nav-ai-icon {
    font-weight: 800;
    color: #6b7280;
    font-size: 18px;
    padding: 2px 6px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.nav-btn.active .nav-ai-icon {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ============ AI CHAT SCREEN ============ */
.ai-chat-screen {
    min-height: 100vh;
    background: 
        radial-gradient(ellipse at 20% 10%, rgba(30, 80, 180, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 90%, rgba(150, 30, 30, 0.25) 0%, transparent 40%),
        linear-gradient(180deg, #0a0a18 0%, #0d0d1a 100%);
    display: flex;
    flex-direction: column;
    padding-bottom: 140px;
}

.chat-header {
    padding: 20px;
    text-align: center;
}

.chat-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 12px 25px;
}

.logo-ai-chat {
    background: var(--accent-blue);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
}

.logo-chat-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

.chat-decoration {
    margin-top: 10px;
    height: 3px;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-red), transparent);
    border-radius: 2px;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 90%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.5;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1a5fd0 100%);
    border: none;
}

/* Chat Suggestions */
.chat-suggestions {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-btn {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1a5fd0 100%);
    border: none;
    border-radius: 20px;
    padding: 14px 20px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 127, 255, 0.3);
}

/* Chat Input */
.chat-input-container {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: rgba(15, 18, 30, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: var(--accent-blue);
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.chat-send-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1a5fd0 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 380px) {
    .control-item {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .tab-btn {
        padding: 10px 30px;
        font-size: 14px;
    }
    
    .method-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
}
