/* PHANTOM-DROID v12.0 - Modern Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-primary: #4ecdc4;
    --accent-danger: #ff6b6b;
    --accent-warning: #feca57;
    --accent-success: #4ecdc4;
    --border-color: #2a2a4e;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
    padding: 30px 40px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border: 2px solid var(--accent-danger);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(78,205,196,0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header h1 {
    font-size: 42px;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-danger);
    position: relative;
    z-index: 1;
}

.header h1 span {
    color: var(--accent-primary);
}

.header .subtitle {
    color: var(--accent-primary);
    font-size: 18px;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.header .badge {
    display: inline-block;
    background: var(--accent-danger);
    color: #000;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.stat-card .icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-danger);
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ===== MENU GRID ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.menu-card {
    background: var(--bg-secondary);
    padding: 30px 20px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.menu-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.menu-card:hover::after {
    transform: scaleX(1);
}

.menu-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow);
}

.menu-card .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.menu-card h3 {
    color: var(--accent-primary);
    font-size: 16px;
}

.menu-card p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--accent-primary);
}

.card h3 {
    color: var(--accent-primary);
    font-size: 18px;
    margin-bottom: 15px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-danger {
    background: var(--accent-danger);
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-warning {
    background: var(--accent-warning);
    color: #000;
}

.btn-sm {
    padding: 6px 15px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: var(--accent-primary);
    font-size: 14px;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #0a0a1a;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== SHELL AREA ===== */
.shell-area {
    background: #0a0a1a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent-primary);
    white-space: pre-wrap;
    word-break: break-all;
}

.shell-area::-webkit-scrollbar {
    width: 6px;
}

.shell-area::-webkit-scrollbar-track {
    background: #0a0a1a;
}

.shell-area::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.shell-input {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.shell-input input {
    flex: 1;
    padding: 12px;
    background: #0a0a1a;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    min-width: 200px;
}

.shell-input input:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.1);
}

/* ===== ACTION GRID ===== */
.action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-grid button {
    padding: 8px 14px;
    background: #0a0a1a;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.action-grid button:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* ===== QR DISPLAY ===== */
.qr-display {
    text-align: center;
    padding: 20px;
    background: #0a0a1a;
    border-radius: var(--radius);
    border: 1px solid var(--accent-primary);
}

.qr-display img {
    max-width: 250px;
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.qr-display pre {
    font-size: 8px;
    line-height: 1.2;
    color: var(--accent-primary);
    overflow-x: auto;
    white-space: pre-wrap;
}

/* ===== INFO BOX ===== */
.info-box {
    background: #0a0a1a;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
    margin: 5px 0;
}

.info-box strong {
    color: var(--accent-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .shell-input {
        flex-direction: column;
    }
    
    .shell-input input {
        width: 100%;
    }
    
    .action-grid {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .container {
        padding: 10px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .stat-card, .menu-card {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===== STATUS BADGE ===== */
.badge-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.badge-online {
    background: #1a3a1a;
    color: var(--accent-primary);
}

.badge-offline {
    background: #3a1a1a;
    color: var(--accent-danger);
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}