* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border-color: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #7d8590;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-orange: #f0883e;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.flash-message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.flash-success {
    background: var(--accent-green);
    color: white;
}

.flash-error {
    background: var(--accent-red);
    color: white;
}

.flash-warning {
    background: var(--accent-orange);
    color: white;
}

.flash-info {
    background: var(--accent-blue);
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.navbar {
    background: var(--bg-secondary);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left, .nav-right {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-time {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 40px 80px;
    min-height: calc(100vh - 60px);
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-highlight {
    display: block;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #a371f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 80px;
}

.btn-primary, .btn-secondary {
    padding: 12px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.btn-primary:hover {
    background: #4a94e8;
    border-color: #4a94e8;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.hero-image {
    margin-top: 60px;
    width: 100%;
    max-width: 600px;
}

.workspace-mockup {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 60px var(--shadow);
}

.monitor {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.monitor-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    opacity: 0.8;
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 40px;
    min-height: calc(100vh - 60px);
}

.auth-content {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px var(--shadow);
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
    font-size: 14px;
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-primary);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background: #4a94e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.dashboard-sidebar {
    width: 320px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 6px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-title {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.config-section {
    margin-bottom: 32px;
}

.config-section h4 {
    color: var(--accent-blue);
    margin-bottom: 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.form-input-dash {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.form-input-dash:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-primary);
}

.slider {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    border: 1px solid var(--border-color);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-blue);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 4px var(--shadow);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-blue);
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.btn-save {
    width: 100%;
    padding: 12px;
    background: var(--accent-green);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    background: #2ea043;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(63, 185, 80, 0.4);
}

.btn-control {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.btn-start {
    background: var(--accent-green);
    color: #fff;
}

.btn-start:hover:not(:disabled) {
    background: #2ea043;
}

.btn-stop {
    background: var(--accent-red);
    color: #fff;
}

.btn-stop:hover:not(:disabled) {
    background: #da3633;
}

.btn-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dashboard-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.dashboard-main::-webkit-scrollbar {
    width: 8px;
}

.dashboard-main::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.dashboard-main::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px var(--shadow);
}

.stat-card h3 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.status-online {
    color: var(--accent-green);
}

.status-offline {
    color: var(--accent-red);
}

.bot-controls {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-controls h3 {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.logs-section {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logs-section h3 {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logs-container {
    max-height: 400px;
    overflow-y: auto;
}

.logs-container::-webkit-scrollbar {
    width: 6px;
}

.logs-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.logs-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.log-entry {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Courier New', monospace;
}

.log-time {
    color: var(--accent-blue);
    margin-right: 12px;
    font-weight: 600;
}

.log-message {
    color: var(--text-primary);
}

.log-entry:last-child {
    border-bottom: none;
}

@media (max-width: 1024px) {
    .hero-section {
        padding: 80px 24px 60px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 60px;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 12px 16px;
    }
    
    .nav-left, .nav-right {
        gap: 12px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .auth-content {
        padding: 32px 24px;
    }
    
    .dashboard-main {
        padding: 20px;
    }
    
    .bot-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
}

.log-message {
    color: var(--text-primary);
}

.log-level-ERROR {
    color: #f85149 !important;
}

.log-level-WARNING {
    color: #f0883e !important;
}

.log-level-INFO {
    color: var(--text-primary);
}
