/* --- GLOBAL VARIABLES --- */
:root {
    --gold: #d4af37;
    --bg: #000;
    --panel: #111;
    --panel-alt: #0a0a0a;
    --border: #333;
    --text: #fff;
    --text-muted: #ccc;
}

/* --- BASE STYLES --- */
body { background: var(--bg); color: var(--text); font: 18px/1.6 'Consolas', monospace; max-width: 600px; margin: 40px auto; padding: 20px; }
img { width: 100%; height: auto; }
h1, h2, h3 { margin-top: 0; }
main section { margin-bottom: 50px; }

/* --- SHARED BUTTONS & INPUTS --- */
button { font: bold 16px inherit; cursor: pointer; transition: 0.3s; text-transform: uppercase; border-radius: 4px; letter-spacing: 1px; }
.reveal-btn, .tutor-video-btn { background: transparent; color: var(--gold); border: 1px dashed var(--gold); }
.reveal-btn { padding: 12px 24px; border-style: solid; }
.tutor-video-btn { padding: 10px; width: 100%; margin-top: 20px; font-size: 14px; }
.tutor-booking-btn, .checkout-btn { background: var(--gold); color: var(--bg); padding: 11px; width: 100%; border: 1px solid var(--gold); margin-top: 12px; font-size: 14px; }
.checkout-btn { padding: 15px 30px; font-size: 18px; border-radius: 8px; }

.reveal-btn:hover, .tutor-video-btn:hover { background: var(--gold); color: var(--bg); border-style: solid; }
.tutor-booking-btn:hover, .checkout-btn:hover { background: transparent; color: var(--gold); border-style: dashed; }

.checkout-input { padding: 12px; border-radius: 6px; font-family: monospace; background: var(--panel-alt); color: var(--text); border: 1px solid var(--border); flex: 1; min-width: 150px; max-width: 250px; }

/* --- PORTAL & ROSTER --- */
.portal-logged-out { border: 1px dashed var(--gold); padding: 30px; text-align: center; border-radius: 8px; background: var(--panel-alt); display: flex; flex-direction: column; align-items: center; }
.portal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.tutor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; width: 100%; }

.tutor-card { background: linear-gradient(135deg, #121212, #050505); border: 1px solid var(--gold); border-radius: 12px; padding: 20px; position: relative; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.05); text-align: center; }
.exp-badge { position: absolute; top: -10px; right: 15px; background: var(--gold); color: var(--bg); padding: 3px 10px; font: bold 12px Arial, sans-serif; border-radius: 4px; }
.portrait { width: 90px; height: 90px; background: #222; border-radius: 50%; border: 1px solid var(--gold); margin: 10px auto 15px; overflow: hidden; }
.portrait img { object-fit: cover; height: 100%; }
.tutor-name { font-size: 20px; letter-spacing: 1.5px; color: var(--gold); }
.distance-badge { font-size: 12px; color: #ffd54f; margin: 5px 0 10px; }
.subjects, .pitch { border-bottom: 1px solid rgba(212, 175, 55, 0.2); padding-bottom: 12px; margin-bottom: 15px; font-size: 13px; }
.subjects { color: var(--gold); margin-top: 6px; }
.subjects sup { font-size: 10px; color: var(--text); margin-left: 2px; text-transform: lowercase; }
.slaptag { font-weight: bold; font-size: 13px; margin-bottom: 10px; }
.pitch { font-style: italic; color: var(--text-muted); line-height: 1.4; }
.quals { font-size: 13px; color: #e0e0e0; line-height: 1.5; text-align: left; }
.quals ul { list-style: none; padding: 0; margin: 0; }
.quals li { margin-bottom: 4px; }
.quals li::before { content: "• "; color: var(--gold); font-weight: bold; }

/* --- CALCULATOR --- */
.pricing-calculator { background: linear-gradient(135deg, #121212, #050505); border: 1px solid var(--gold); border-radius: 12px; padding: 30px; }
.mad-libs-text { font-size: 22px; line-height: 2; margin-top: 0; }
.qty-wrapper, .service-wrapper, .level-wrapper, .location-wrapper { white-space: nowrap; }

.color-qty { color: #4fc3f7; } .color-service { color: #ce93d8; } .color-level { color: #ffab91; } .color-discount { color: #81c784; } .color-base { color: #b0bec5; }

/* Font size inheritance fixes the scaling bug */
.inline-input, .inline-select { font-size: inherit; font-family: inherit; font-weight: bold; border: none; border-bottom: 2px dashed var(--gold); background: transparent; cursor: pointer; outline: none; padding: 0 5px; text-align: center; -webkit-appearance: none; }
.inline-select option { background: var(--panel); color: var(--text); font-size: 16px; }
.inline-input { width: 45px; }
.superscript-badge { font: bold 0.55em inherit; vertical-align: super; margin: 0 5px 0 2px; transition: 0.2s; }

.total-section { margin-top: 30px; text-align: center; }
.total-section h2 { margin-bottom: 5px; color: var(--gold); }
.receipt-link { color: #aaa; font-size: 14px; cursor: pointer; text-decoration: underline; margin-top: 0; }
.receipt-link:hover { color: var(--text); }
.live-formula { font: bold 18px 'Courier New', monospace; text-align: center; letter-spacing: 1px; }

/* --- FILTERS --- */
.filter-controls-container { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 25px; }
.custom-filter-input { background: var(--panel-alt); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 12px; font: 15px inherit; flex: 1; min-width: 200px; outline: none; transition: 0.3s; }
.custom-filter-input:focus { border-color: var(--gold); }
.custom-filter-input option { background: var(--panel) !important; color: var(--text) !important; }

/* --- LIBRARY BOOKSHELF --- */
#link-library { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 2px; padding: 30px 10px 0; background: #050505; border-radius: 8px; border: 1px solid var(--panel); }
.book { display: flex; align-items: center; justify-content: flex-end; background: #151515; color: var(--gold); text-decoration: none; font-size: 13px; letter-spacing: 1px; width: 36px; height: 140px; writing-mode: vertical-rl; border: 1px solid #222; border-left: 2px solid var(--border); border-top: 3px solid var(--gold); border-radius: 4px 4px 0 0; transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); margin-bottom: 30px; box-shadow: 0 8px 0 #1a1a1a; flex-shrink: 0; white-space: nowrap; overflow: hidden; padding: 10px 0; }
.book span { transform: rotate(180deg); }
.book:nth-child(even) { height: 130px; background: var(--panel); }
.book:nth-child(3n) { height: 155px; background: #0d0d0d; border-top-color: #81c784; color: #81c784; }
.book:nth-child(5n) { height: 120px; background: #1a1a1a; border-top-color: #4fc3f7; color: #4fc3f7; }
.book:nth-child(7n) { height: 145px; background: #181818; border-top-color: #ce93d8; color: #ce93d8; }
.book:hover { background: var(--gold) !important; color: var(--bg) !important; border-color: var(--gold); transform: translateY(-20px); z-index: 10; box-shadow: 0 28px 0 #1a1a1a, -5px 10px 20px rgba(0,0,0,0.8); }

/* --- SOCIAL MEDIA FEED CAROUSEL --- */
.social-carousel { display: flex; flex-direction: row-reverse; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding-bottom: 15px; width: 100%; align-items: center; scrollbar-width: none; -ms-overflow-style: none; }
.social-carousel::-webkit-scrollbar { display: none; }

.social-post { flex: 0 0 92%; scroll-snap-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.social-header { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--panel-alt); }
.social-avatar { width: 35px; height: 35px; background: var(--gold); color: var(--bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 12px; }
.social-meta { display: flex; flex-direction: column; line-height: 1.2; }
.social-username { font-weight: bold; color: var(--text); font-size: 15px; }
.social-date { font-size: 12px; color: var(--text-muted); }
.social-img { width: 100%; height: auto; display: block; }
.social-share-btn { margin-left: auto; color: var(--text-muted); background: none; border: none; font-size: 22px; cursor: pointer; transition: 0.2s; padding: 0 5px; }
.social-share-btn:hover { color: var(--gold); }