:root { 
    --gold: #FFC107; --green: #2ecc71; --red: #e74c3c; --glass: rgba(0, 0, 0, 0.75); 
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

h1, h2, h3, .logo-area span, .back-link, .uptime-percentage, 
.pill-btn, .login-btn, .cancel-btn, th, td, .refresh-note, 
.status-pill, .card-info h3, .card-info p, .segment-footer span, 
.no-logs, .invite-text, .invite-btn, .last-sync, .modal-content h3, .status-header p,.invite-text span {
    font-family: 'Chewy', cursive !important;
}

body { 
    background: url('https://i.postimg.cc/nVQMj4mK/BGHONEY.png') no-repeat center fixed; 
    background-size: cover; color: white; min-height: 100vh; overflow-x: hidden; 
}

.background-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(20,15,5,0.9) 100%); z-index: -1; 
}

nav { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 8%; background: var(--glass); backdrop-filter: blur(10px); 
    border-bottom: 1px solid rgba(255,193,7,0.1); width: 100%; 
}

.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { width: 35px; }
.logo-area span { 
    font-size: 1.8rem; color: var(--gold); 
    animation: honey-glow 3s infinite alternate ease-in-out; 
}

@keyframes honey-glow { from { text-shadow: 0 0 5px var(--gold); } to { text-shadow: 0 0 20px var(--gold); } }

.back-link { color: white; text-decoration: none; font-size: 1.1rem; }
.status-container { max-width: 1000px; margin: 40px auto; padding: 0 15px; }
.status-header { text-align: center; margin-bottom: 35px; }
.status-header h1 { font-size: 3.5rem; color: var(--gold); }

.status-card { background: var(--glass); padding: 30px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); margin-bottom: 25px; }
.card-header { display: flex; justify-content: space-between; }
.card-info h3 { color: var(--gold); font-size: 2.2rem; }
.uptime-percentage { font-size: 2.2rem; color: var(--green); }

.segments-container { display: flex; gap: 4px; height: 40px; margin: 15px 0; }
.segment { flex: 1; background: var(--green); border-radius: 4px; transition: 0.3s; }
.segment.offline { background: var(--red); box-shadow: 0 0 10px var(--red); }
.segment.degraded { background: #f1c40f; }
.segment-footer { display: flex; justify-content: space-between; font-size: 0.85rem; opacity: 0.5; }

.invite-container { 
    background: rgba(255, 193, 7, 0.05); 
    border: 1px dashed rgba(255, 193, 7, 0.3); 
    border-radius: 20px; padding: 25px; 
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 20px;
}
/* --- INVITE BUTTON SUCCESS STATE --- */
.invite-btn {
    background: var(--gold);
    color: black;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* New style for when the link is successfully copied */
.invite-btn.copied {
    background: var(--green) !important; /* Green color from :root */
    color: white !important;
    box-shadow: 0 0 20px var(--green);
    transform: scale(1.05);
}

.invite-btn:hover:not(.copied) {
    background: white;
    box-shadow: 0 0 25px var(--gold);
    transform: translateY(-3px);
}
.yellow-plus { color: var(--gold); font-size: 1.3rem; }

.logs-container { background: var(--glass); border-radius: 20px; padding: 30px; border: 1px solid rgba(255,255,255,0.05); }
.logs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* ADMIN PILL BUTTONS */
#admin-controls { display: flex; gap: 10px; }
.pill-btn { padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; cursor: pointer; transition: 0.3s; border: 1px solid transparent; display: flex; align-items: center; gap: 8px; }
.login-pill { background: rgba(255,193,7,0.1); border-color: var(--gold); color: var(--gold); }
.logout-pill { background: rgba(255,255,255,0.05); border-color: white; color: white; }
.clear-pill { background: rgba(231,76,60,0.1); border-color: var(--red); color: var(--red); }
.pill-btn:hover { transform: scale(1.05); filter: brightness(1.2); }

.status-pill { color: var(--red); border: 1px solid var(--red); padding: 4px 12px; border-radius: 8px; background: rgba(231,76,60,0.1); display: inline-block; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px; color: var(--gold); border-bottom: 2px solid rgba(255,193,7,0.2); }
td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* MODAL & REFRESH */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); align-items: center; justify-content: center; }
.modal-content { background: #111; padding: 40px; width: 90%; max-width: 400px; border-radius: 20px; border: 2px solid var(--gold); text-align: center; }
#admin-pass-input { width: 100%; padding: 12px; margin: 20px 0; background: #000; border: 1px solid #333; color: var(--gold); border-radius: 8px; text-align: center; outline: none; font-size: 1.1rem;}
.modal-btns { display: flex; gap: 15px; }
.login-btn { flex: 1; background: var(--gold); color: black; border: none; padding: 12px; border-radius: 10px; cursor: pointer; }
.cancel-btn { flex: 1; background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 12px; border-radius: 10px; cursor: pointer; }
.refresh-note { text-align: center; margin-top: 35px; opacity: 0.7; font-size: 1.1rem; }
.sync-icon { animation: spin 2s linear infinite; color: var(--gold); margin-right: 8px; }
@keyframes spin { from {transform:rotate(0deg)} to {transform:rotate(360deg)} }
/* --- ADMIN MODAL SHAKE ANIMATION --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

.shake-error {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: var(--red) !important;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.5) !important;
}

.modal-content {
    background: #111;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    border: 2px solid var(--gold);
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.maint-box { display: flex; align-items: center; gap: 10px; margin-right: 15px; }
.maint-text { color: var(--gold); font-size: 0.9rem; font-family: 'Chewy' !important; }

/* The switch - the box around the slider */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.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: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--gold); }
input:checked + .slider:before { transform: translateX(20px); }

/* Ensure the sub-header also uses Chewy */
.status-header p, .invite-text span { font-family: 'Chewy', cursive !important; }
/* Base pill button for Login/Logout/Clear */
.pill-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-pill { background: rgba(255,193,7,0.1); border-color: var(--gold); color: var(--gold); }
.logout-pill { background: rgba(255,255,255,0.05); border-color: white; color: white; }
.clear-pill { background: rgba(231,76,60,0.1); border-color: var(--red); color: var(--red); }
@media screen and (max-width: 768px) {
    .status-header h1 { font-size: 2.5rem; }
    #logs-table thead { display: none; }
    #logs-table tr { display: block; background: rgba(255,255,255,0.02); margin-bottom: 10px; border-radius: 10px; padding: 10px; }
    #logs-table td { display: flex; justify-content: space-between; border: none; padding: 8px 5px; }
    #logs-table td::before { content: attr(data-label); color: var(--gold); font-family: 'Chewy'; }
}
/* --- PREMIUM ADMIN DASHBOARD LAYOUT --- */
.logs-header {
    display: flex;
    color: var(--gold);
    font-size: 2rem;
    flex-direction: column; /* Stack Title and Controls */
    gap: 15px;
    margin-bottom: 25px;
}

.admin-dashboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    border-radius: 15px;
    border: 1px solid rgba(255, 193, 7, 0.1);
    width: 100%;
    flex-wrap: wrap; /* Allows wrapping on small screens */
    gap: 15px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* --- MOBILE ONLY CHANGES --- */
@media screen and (max-width: 768px) {
    /* 1. Force invite text to stay in a single line */
    .invite-container {
        flex-direction: column !important; /* Stack vertical */
        text-align: center !important;
        padding: 20px !important;
        gap: 15px !important;
    }

    .invite-text {
        width: 100% !important;
        white-space: nowrap !important; /* Forces single line */
        overflow: hidden;
        text-overflow: ellipsis; /* Adds ... if text is too long for the screen */
        font-size: 0.9rem; /* Slightly smaller to fit iPhone screens */
    }

    /* 2. Change Invite Button to a Pill shape and put it below */
    .invite-btn {
        width: 100% !important;
        border-radius: 50px !important; /* Perfect Pill Shape */
        justify-content: center !important;
        padding: 10px 0 !important;
    }

    /* 3. Fix Admin Controls Overlap on Mobile */
    .logs-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    #admin-controls {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important; /* Stack Maintenance, Clear, Logout */
        gap: 10px !important;
        background: rgba(255, 255, 255, 0.03);
        padding: 15px;
        border-radius: 15px;
    }

    .maint-box {
        width: 100% !important;
        justify-content: space-between !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 8px;
    }

    .pill-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Ensure Toggle text is crisp */
.maint-text {
    font-family: 'Chewy', cursive !important;
    font-size: 1rem;
    letter-spacing: 0.5px;
}