* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --accent-color: #ffb627;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --panel-bg: rgba(20, 20, 20, 0.95);
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --success-color: #00ff88;
    --error-color: #ff3366;
    --warning-color: #ffaa00;
    --glow-color: #ff6b35;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #0a0a0a, #1a0a0a, #0a1a0a, #0a0a1a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

.particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    top: 80%;
    left: 40%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    top: 40%;
    left: 60%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    top: 10%;
    left: 90%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.header-content {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 182, 39, 0.1));
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
}

.main-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5em;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.fire-text {
    display: block;
    font-size: 0.6em;
    margin-top: 10px;
    animation: fireFlicker 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 107, 53, 0.5); }
    to { text-shadow: 0 0 40px rgba(255, 107, 53, 0.8); }
}

@keyframes fireFlicker {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.subtitle {
    font-size: 1.3em;
    color: var(--text-gray);
    font-weight: 300;
}

/* Panel Styles */
.panels-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
}

.setup-panel {
    grid-column: 1;
    grid-row: 1;
}

.control-panel {
    grid-column: 2;
    grid-row: 1 / 3;
}

.logs-panel {
    grid-column: 1;
    grid-row: 2;
}

.panel {
    background: var(--panel-bg);
    border-radius: 15px;
    border: 2px solid rgba(255, 107, 53, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.panel:hover {
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.2);
}

.panel-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.panel-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5em;
    font-weight: 700;
    flex: 1;
}

.panel-header i {
    font-size: 1.5em;
}

.bot-counter {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.panel-content {
    padding: 25px;
    height: calc(100% - 80px);
    overflow-y: auto;
}

/* Input Styles */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1.1em;
}

.input-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #666, #888);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #777, #999);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color), #ff5577);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 51, 102, 0.4);
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* Bot Item Styles */
.bot-item {
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 182, 39, 0.05));
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.bot-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.bot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bot-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3em;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 182, 39, 0.3);
}

.bot-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-connected {
    background: linear-gradient(135deg, var(--success-color), #00cc77);
    color: white;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    animation: connectedPulse 2s ease-in-out infinite;
}

.status-disconnected {
    background: linear-gradient(135deg, var(--error-color), #cc2244);
    color: white;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.3);
}

@keyframes connectedPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 136, 0.6); }
}

.bot-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.bot-info {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.movement-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 200px;
    margin-bottom: 15px;
}

.chat-input, .advanced-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.chat-input input, .advanced-controls input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
}

/* Logs Styles */
.logs {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.log-entry {
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 5px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.05);
}

.log-info {
    color: #00aaff;
    border-left-color: #00aaff;
}

.log-error {
    color: var(--error-color);
    border-left-color: var(--error-color);
    background: rgba(255, 51, 102, 0.1);
}

.log-success {
    color: var(--success-color);
    border-left-color: var(--success-color);
    background: rgba(0, 255, 136, 0.1);
}

.log-chat {
    color: #bb88ff;
    border-left-color: #bb88ff;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

/* Responsive Design */
@media (max-width: 1200px) {
    .panels-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
    
    .setup-panel {
        grid-column: 1;
        grid-row: 1;
    }
    
    .control-panel {
        grid-column: 1;
        grid-row: 3;
    }
    
    .logs-panel {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2.5em;
    }
    
    .bot-controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .movement-controls {
        max-width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .chat-input, .advanced-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}
