:root {
    /* Refined Color Palette */
    --yellow: #FFD700;
    --orange: #FF8C00;
    --brown: #8B4513;
    --dark-brown: #3E2723;
    --green: #00E676;
    --red: #FF3B30;
    --black: #050505;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { 
    background:var(--black); 
    font-family:'Inter', sans-serif; 
    color:#e0e0e0; 
    min-height:100vh;
    line-height: 1.6;
}

h1, h2, h3, h4, .brand-font {
    font-family: 'Outfit', sans-serif;
}

/* LOGIN */
#login-screen { display:flex; align-items:center; justify-content:center; min-height:100vh; }
.login-box { 
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--glass-shadow);
}
.login-box h1 { font-size:2.5rem; color:var(--yellow); margin-bottom:10px; font-weight:800; }
.login-box p  { color:#aaa; margin-bottom:24px; font-size:1rem; }
.error-msg { color:#f87171; font-size:0.9rem; margin-top:15px; font-weight:500; }

/* INPUTS */
input[type="password"], input[type="text"], input[type="url"],
input[type="date"], textarea, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 12px 16px;
    outline: none;
    transition: all 0.3s ease;
}
input:focus, textarea:focus, select:focus { 
    border-color: var(--yellow); 
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}
textarea { resize:vertical; min-height:80px; }
select option { background:#111; color: #fff; }

/* BUTTONS */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    padding: 12px 24px; 
    border-radius: 14px; 
    font-family: 'Outfit', sans-serif; 
    font-size: 1.05rem; 
    font-weight: 700;
    cursor: pointer; 
    border: none; 
    transition: all 0.3s ease; 
}
.btn:hover { transform:translateY(-3px); }
.btn:active { transform:scale(.97) translateY(0); }
.btn-yellow { 
    background: var(--yellow); 
    color: var(--black); 
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3); 
}
.btn-yellow:hover { box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5); }
.btn-green  { 
    background: var(--green); 
    color: var(--black); 
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.3); 
    padding: 8px 18px; 
    font-size: 0.95rem; 
}
.btn-green:hover { box-shadow: 0 10px 30px rgba(0, 230, 118, 0.5); }
.btn-red    { 
    background: var(--red); 
    color: #fff; 
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.3); 
    padding: 8px 18px; 
    font-size: 0.95rem; 
}
.btn-red:hover { box-shadow: 0 10px 30px rgba(255, 59, 48, 0.5); }
.btn-ghost  { 
    background: rgba(255,255,255,0.05); 
    color: #e0e0e0; 
    border: 1px solid rgba(255,255,255,0.1); 
    padding: 8px 16px; 
    font-size: 0.9rem; 
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ADMIN LAYOUT */
#admin-screen { display:none; }

header {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
header h1 { font-size: 1.6rem; color: var(--yellow); font-weight: 800; margin: 0; }

/* TABS */
.admin-tabs { 
    display: flex; 
    gap: 10px; 
    border-bottom: 1px solid var(--glass-border); 
    padding: 0 30px; 
    background: rgba(5, 5, 5, 0.95); 
}
.admin-tab {
    font-family: 'Outfit', sans-serif; 
    font-size: 1.05rem;
    font-weight: 600;
    padding: 16px 24px; 
    cursor: pointer; 
    border: none; 
    background: none;
    color: #888; 
    border-bottom: 3px solid transparent; 
    margin-bottom: -1px;
    transition: all 0.3s ease;
}
.admin-tab:hover { color:#e0e0e0; }
.admin-tab.active { color:var(--yellow); border-bottom-color:var(--yellow); }

.admin-panel { display:none; padding:30px; max-width:900px; margin:0 auto; }
.admin-panel.active { display:block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CARD */
.card { 
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--glass-shadow);
}
.card h2 { font-size:1.4rem; color:var(--yellow); margin-bottom:20px; display:flex; align-items:center; gap:10px; font-weight: 800; }

.field { margin-bottom:18px; }
.field label { display:block; font-size:0.85rem; font-weight:600; color:#aaa; margin-bottom:8px; text-transform:uppercase; letter-spacing:1px; }

.row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }

/* ITEMS LIST */
.items-list { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.item-row {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.item-row:hover {
    transform: translateX(4px);
    border-color: rgba(255, 215, 0, 0.2);
}
.item-row-body { flex:1; min-width:0; }
.item-title { font-family:'Outfit', sans-serif; font-weight: 700; color:var(--yellow); font-size:1.1rem; margin-bottom:4px; }
.item-sub   { font-size:0.9rem; color:#aaa; line-height: 1.5; }
.item-pinned-badge { font-size:0.75rem; font-weight: 800; background:rgba(255, 140, 0, 0.2); color:var(--orange); padding:3px 10px; border-radius:99px; margin-left:8px; text-transform: uppercase;}
.item-actions { display:flex; gap:8px; flex-shrink:0; margin-top:4px; }

/* ADD FORM */
.add-form {
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 25px;
    margin-top: 10px;
}
.add-form h3 { font-family:'Outfit', sans-serif; color:#ccc; font-size:1.1rem; margin-bottom:16px; }

/* SAVE BAR */
.save-bar {
    position:fixed; bottom:0; left:0; right:0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}
.save-status { font-size:1rem; font-weight: 500; color:#888; }
.save-status.saving { color:var(--orange); }
.save-status.saved  { color:var(--green); }
.save-status.error  { color:var(--red); }

.bottom-spacer { height:85px; }

.note-box { 
    background: rgba(255, 140, 0, 0.1); 
    border: 1px solid rgba(255, 140, 0, 0.3); 
    border-radius: 16px; 
    padding: 16px 20px; 
    font-size: 0.95rem; 
    color: #FFE082; 
    margin-bottom: 25px; 
}
.note-box strong { color:var(--yellow); font-weight: 700; }

.toggle-row { display:flex; align-items:center; gap:12px; }
.toggle { width:46px; height:26px; background:#444; border-radius:99px; position:relative; cursor:pointer; transition:background .3s; flex-shrink:0; }
.toggle.on { background:var(--yellow); box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.toggle::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; background:#fff; border-radius:50%; transition:left .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.toggle.on::after { left:23px; }

.platform-badge { font-family:'Outfit', sans-serif; font-size:0.75rem; font-weight:800; padding:3px 10px; border-radius:99px; margin-right:8px; text-transform: uppercase; }
.platform-badge.yt { background:rgba(255, 59, 48, 0.15); color:var(--red); }
.platform-badge.tt { background:rgba(255, 255, 255, 0.1); color:#fff; }
