/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ==================== USER VIEW - DOWN MESSAGE ==================== */
#user-view {
    display: none;
    width: 100%;
    height: 100vh;
    background: #0a0e1a;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
}

#user-view.active {
    display: flex;
}

.down-icon {
    font-size: 80px;
    color: #ef4444;
    margin-bottom: 20px;
    animation: pulse-down 2s infinite;
}

@keyframes pulse-down {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.down-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.down-subtitle {
    font-size: 16px;
    color: #9ca3af;
    max-width: 400px;
}

.down-footer {
    margin-top: 20px;
    color: #6b7280;
    font-size: 13px;
}

/* ==================== ADMIN VIEW ==================== */
#admin-view {
    display: none;
    max-width: 1200px;
    width: 100%;
    padding: 16px;
    background: #0a0e1a;
    min-height: 100vh;
    color: #f3f4f6;
}

#admin-view.active {
    display: block;
}

/* ==================== HEADER ==================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.live-badge {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #34d399;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* ==================== STATUS INDICATOR ==================== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-indicator.online {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-indicator.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #34d399;
    animation: pulse 1.5s infinite;
}

.status-dot.offline {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

/* ==================== CARDS ==================== */
.card {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    margin-bottom: 4px;
}

.card-subtitle {
    color: #9ca3af;
    font-size: 11px;
    margin-bottom: 10px;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

/* ==================== BUTTONS ==================== */
.btn-action {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border: none;
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-gmail {
    background: linear-gradient(135deg, #ea4335, #c5221f);
}

.btn-down {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-down.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-down:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.stat-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.stat-box .number {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(to right, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-box .label {
    font-size: 9px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ==================== URL CONTAINER ==================== */
.url-container {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    background: rgba(0,0,0,0.4);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    flex-wrap: wrap;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 5px 10px;
    color: #38bdf8;
    font-size: 11px;
    outline: none;
    min-width: 100px;
}

.btn-copy {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(255,255,255,0.1);
}

.status-display {
    margin-top: 10px;
    font-size: 11px;
    color: #9ca3af;
}

/* ==================== LOG LIST ==================== */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.log-list::-webkit-scrollbar {
    width: 4px;
}

.log-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.log-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.log-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.3s ease;
}

.log-box:hover {
    border-color: rgba(255,255,255,0.1);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ip-badge {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 2px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
}

.country-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.2);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.log-time {
    font-size: 10px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.log-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.detail-label {
    font-size: 9px;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.detail-value {
    font-size: 12px;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    word-break: break-all;
}

.detail-value .flag {
    font-size: 16px;
}

.raw-ua {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255,255,255,0.04);
    font-size: 9px;
    color: #9ca3af;
    word-break: break-all;
}

/* ==================== GMAIL GRID ==================== */
.gmail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.gmail-item {
    background: rgba(234, 67, 53, 0.04);
    border: 1px solid rgba(234, 67, 53, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gmail-item:hover {
    border-color: rgba(234, 67, 53, 0.3);
}

.gmail-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea4335, #c5221f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
}

.gmail-email {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    word-break: break-all;
}

.gmail-meta {
    font-size: 9px;
    color: #9ca3af;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.gmail-badge {
    background: rgba(234, 67, 53, 0.12);
    color: #ea4335;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 600;
}

.gmail-device-badge {
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 8px;
    border: 1px solid rgba(56, 189, 248, 0.1);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 12px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    #admin-view {
        padding: 10px;
    }
    .admin-header h1 {
        font-size: 16px;
    }
    .card {
        padding: 10px 12px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .log-details-grid {
        grid-template-columns: 1fr 1fr;
    }
    .gmail-grid {
        grid-template-columns: 1fr;
    }
    .down-title {
        font-size: 24px;
    }
    .down-icon {
        font-size: 60px;
    }
    .status-bar {
        width: 100%;
        justify-content: flex-start;
    }
}