:root {
    --primary: #FF4E50;
    --secondary: #F9D423;
    --dark: #121212;
    --card-bg: #1E1E1E;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --border: #333333;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    background-color: var(--dark);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-glob {
    position: fixed;
    top: -20vh;
    right: -20vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 78, 80, 0.15) 0%, rgba(18, 18, 18, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    vertical-align: middle;
    margin-left: 10px;
    letter-spacing: 1px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 500;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.stat-info h3 { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.stat-info h2 { font-size: 1.8rem; font-weight: 700; }

/* MAIN LAYOUT */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .main-content { grid-template-columns: 1fr; }
}

/* FORM */
.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.section-header p { color: var(--text-muted); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    background: #121212;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 78, 80, 0.2);
}

textarea { resize: vertical; min-height: 100px; }

.btn-primary {
    width: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 14px;
    border-radius: 8px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }

.status-msg { margin-top: 1rem; text-align: center; font-size: 0.9rem; min-height: 1.2rem; }

/* PHONE PREVIEW */
.phone-mockup {
    background: #000;
    border: 8px solid #333;
    border-radius: 30px;
    padding: 10px;
    width: 280px;
    height: 550px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.notch {
    width: 100px;
    height: 20px;
    background: #333;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

.screen {
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=1000&auto=format&fit=crop') center/cover;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.lock-screen-time {
    text-align: center;
    margin-top: 60px;
    font-size: 3rem;
    font-weight: 200;
    color: rgba(255,255,255,0.8);
}

.notif-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    margin: 20px 10px;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    animation: slideIn 0.5s ease-out;
}

.notif-icon img { width: 32px; height: 32px; border-radius: 6px; }

.notif-content { flex: 1; }
.notif-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,0.8); margin-bottom: 4px; }
.notif-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.notif-body { font-size: 0.85rem; color: rgba(255,255,255,0.9); line-height: 1.2; }

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

footer {
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
    font-size: 0.8rem;
}

/* CONFIG SECTION */
.config-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.config-row:last-child { border-bottom: none; }

.config-info h4 { font-size: 1rem; margin-bottom: 4px; }
.config-info p { font-size: 0.8rem; color: var(--text-muted); }

.config-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: '';
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #4ade80; }
input:checked + .slider:before { transform: translateX(26px); }

/* Time Input */
input[type='time'] {
    background: #000;
    border: 1px solid #333;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    width: auto;
}

.btn-secondary {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.btn-secondary:hover { background: #444; }

/* LOGS TABLE */
.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.logs-table th {
    text-align: left;
    color: var(--text-muted);
    padding: 10px;
    border-bottom: 1px solid #333;
    font-weight: 500;
}
.logs-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.logs-table tr:last-child td { border-bottom: none; }

.log-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.type-manual { background: rgba(255, 78, 80, 0.2); color: #FF4E50; }
.type-auto { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.log-time { color: var(--text-muted); font-size: 0.8rem; }

