/* ========================================
   BigBossDE Pro - Control Panel Styles
   ======================================== */

:root {
    /* Ana Renkler */
    --bg-primary: #0a0a12;
    --bg-secondary: #0f0f1a;
    --bg-card: rgba(15, 15, 30, 0.8);
    --bg-card-hover: rgba(20, 20, 40, 0.9);
    
    /* Metin Renkleri */
    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --text-muted: #5a5a6e;
    
    /* Vurgu Renkleri */
    --accent-orange: #ff6b35;
    --accent-pink: #f72585;
    --accent-purple: #7b2cbf;
    --accent-blue: #4361ee;
    --accent-cyan: #4cc9f0;
    --accent-gold: #ffd700;
    --accent-gold-dark: #b8860b;
    
    /* Durum Renkleri */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Gradientler */
    --gradient-orange: linear-gradient(135deg, #ff6b35 0%, #f72585 100%);
    --gradient-purple: linear-gradient(135deg, #7b2cbf 0%, #4361ee 100%);
    --gradient-blue: linear-gradient(135deg, #4361ee 0%, #4cc9f0 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    
    /* Border */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow-orange: 0 0 20px rgba(255, 107, 53, 0.3);
    --shadow-glow-purple: 0 0 20px rgba(123, 44, 191, 0.3);
    --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
    --shadow-glow-gold: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* ========================================
   Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(123, 44, 191, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(67, 97, 238, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   Header
   ======================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-left: 8px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background: var(--error);
    box-shadow: 0 0 8px var(--error);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-ip {
    color: var(--success);
    font-weight: 500;
}

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

/* ========================================
   Main Content
   ======================================== */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 73px);
}

/* ========================================
   Panels
   ======================================== */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    backdrop-filter: blur(10px);
}

.panel-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

/* ========================================
   Toggle Switches
   ======================================== */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.toggle-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.toggle-item.active {
    border-color: rgba(255, 107, 53, 0.3);
    background: rgba(255, 107, 53, 0.05);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--gradient-orange);
    border-color: transparent;
    box-shadow: var(--shadow-glow-orange);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

/* TURBO MODE Özel Stilleri */
.toggle-item.turbo {
    border-color: rgba(76, 201, 240, 0.3);
    background: rgba(76, 201, 240, 0.08);
}

.toggle-item.turbo.active {
    border-color: rgba(76, 201, 240, 0.5);
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.15) 0%, rgba(67, 97, 238, 0.15) 100%);
    animation: turboPulse 2s ease-in-out infinite;
}

.toggle-switch input:checked + .toggle-slider.turbo {
    background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.5);
}

@keyframes turboPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(76, 201, 240, 0.3); }
    50% { box-shadow: 0 0 15px rgba(76, 201, 240, 0.5); }
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group.half {
    flex: 1;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.2);
}

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

.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.2);
}

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

.form-hint {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

/* ========================================
   Status Cards
   ======================================== */
.status-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.status-card {
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.status-card-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.status-card-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-indicator.active {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* ========================================
   Device Selector
   ======================================== */
.device-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.device-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.device-btn.active {
    background: var(--gradient-blue);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow-purple);
}

.device-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Control Buttons
   ======================================== */
.control-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start {
    background: var(--gradient-purple);
    color: white;
    box-shadow: var(--shadow-glow-purple);
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 44, 191, 0.4);
}

.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-stop {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-stop:hover:not(:disabled) {
    border-color: var(--error);
    color: var(--error);
}

.btn-stop:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Progress Section
   ======================================== */
.progress-section {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-purple);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========================================
   Current Status
   ======================================== */
.current-status {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.status-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.status-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

.status-value.running {
    color: var(--accent-cyan);
}

.status-value.stopped {
    color: var(--error);
}

/* ========================================
   Live Log
   ======================================== */
.live-log {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-clear {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.log-content {
    padding: 12px 16px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
}

.log-entry {
    padding: 6px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.success {
    color: var(--success);
}

.log-entry.error {
    color: var(--error);
}

.log-entry.system {
    color: var(--accent-cyan);
}

/* ========================================
   Stats Grid
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.stat-card.success .stat-icon {
    color: var(--success);
}

.stat-card.error .stat-icon {
    color: var(--error);
}

.stat-card.info .stat-icon {
    color: var(--accent-purple);
}

.stat-card.time .stat-icon {
    color: var(--accent-cyan);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

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

.stat-card.error .stat-value {
    color: var(--error);
}

.stat-card.info .stat-value {
    color: var(--text-primary);
}

.stat-card.time .stat-value {
    color: var(--text-primary);
}

/* ========================================
   Activities Section
   ======================================== */
.activities-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.activities-title {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.activities-list {
    padding: 8px 0;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.activity-item.success {
    color: var(--success);
}

.activity-item.error {
    color: var(--error);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 260px 1fr 280px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    
    .panel-left {
        grid-column: 1;
        grid-row: 1;
    }
    
    .panel-center {
        grid-column: 2;
        grid-row: 1;
    }
    
    .panel-right {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .panel-left,
    .panel-center,
    .panel-right {
        grid-column: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 12px;
    }
    
    .device-selector {
        flex-wrap: wrap;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.log-entry {
    animation: fadeIn 0.3s ease;
}

.activity-item {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   Login Overlay
   ======================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-overlay.hidden {
    display: none;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.login-logo {
    margin-bottom: 20px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.2);
}

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

.login-error {
    color: var(--error);
    font-size: 13px;
    min-height: 20px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-purple);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow-purple);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 44, 191, 0.4);
}

/* ========================================
   Gold/Sınırsız Mod Stilleri
   ======================================== */
.toggle-item.gold {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}

.toggle-item.gold.active {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(184, 134, 11, 0.12) 100%);
    animation: goldPulse 2s ease-in-out infinite;
}

.toggle-switch input:checked + .toggle-slider.gold {
    background: var(--gradient-gold);
    box-shadow: var(--shadow-glow-gold);
}

.gold-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
}

/* ========================================
   Validation Error Stilleri
   ======================================== */
.validation-error {
    display: block;
    color: var(--error);
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.limit-hint {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 10px;
}

/* ========================================
   Logout Button
   ======================================== */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}
