/* ===== SECRET THE WORLD - Global Design System =====
   Mobile-first responsive CSS
   ================================================== */
:root {
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --primary-light: #d5f5e3;
    --secondary: #764ba2;
    --accent: #f39c12;
    --danger: #e74c3c;
    --dark: #13211c;
    --dark-2: #1e2d26;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --white: #ffffff;
    --body-bg: #f6f1e7;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-muted: #6c757d;
    --border: #e0ddd5;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-main: 'Manrope','Segoe UI',Arial,sans-serif;
    --font-display: 'Space Grotesk','Manrope',sans-serif;
    --navbar-h: 70px;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); background: var(--body-bg); color: var(--text); line-height: 1.7; padding-top: var(--navbar-h); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--primary); color: white; padding: 8px 16px; z-index: 9999; border-radius: 0 0 8px 0; }
.skip-link:focus { top: 0; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.2; color: var(--dark); font-weight: 700; }
h1 { font-size: clamp(1.8rem,4vw,3rem); }
h2 { font-size: clamp(1.5rem,3vw,2.2rem); }
h3 { font-size: clamp(1.2rem,2.5vw,1.6rem); }
h4 { font-size: 1.2rem; }
p { color: var(--text-muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 1.25rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.5rem; border-radius: var(--radius-xl); font-weight: 600; font-size: 0.95rem; border: 2px solid transparent; cursor: pointer; transition: var(--transition); white-space: nowrap; text-decoration: none; line-height: 1; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(46,204,113,0.35); }
.btn-secondary { background: var(--gray-100); color: var(--dark); border-color: var(--gray-300); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-dark { background: var(--dark); color: white; border-color: var(--dark); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.6rem; border-radius: 50%; width: 40px; height: 40px; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--dark); margin-bottom: 0.4rem; }
.form-control { width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius); border: 2px solid var(--gray-300); background: var(--white); font-size: 0.95rem; color: var(--text); transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,204,113,0.15); }
.form-control::placeholder { color: var(--gray-500); }
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: 0.85rem; margin-top: 0.3rem; display: none; }
.form-control.is-invalid ~ .invalid-feedback { display: block; }
.form-text { color: var(--gray-600); font-size: 0.83rem; margin-top: 0.3rem; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.input-group { position: relative; }
.input-group .form-control { padding-left: 2.8rem; }
.input-group .input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--gray-500); pointer-events: none; }
.input-group.icon-right .form-control { padding-left: 1rem; padding-right: 2.8rem; }
.input-group.icon-right .input-icon { left: auto; right: 1rem; }
.pw-toggle { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--gray-500); cursor: pointer; padding: 0; }
.pw-toggle:hover { color: var(--primary); }

/* Cards */
.card { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); font-weight: 600; font-size: 1rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); background: var(--gray-100); }
.card-img-top { width: 100%; height: 220px; object-fit: cover; }
.card-title { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--dark); }
.card-text { color: var(--text-muted); font-size: 0.9rem; }
.card-img-wrapper { overflow: hidden; position: relative; }
.card-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: white; padding: 4px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; z-index: 1; }
.card-hover-lift { transition: var(--transition); }
.card-hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); border-left: 4px solid; margin-bottom: 1rem; font-size: 0.92rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.alert i { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: #d4edda; border-color: var(--primary); color: #155724; }
.alert-danger { background: #f8d7da; border-color: var(--danger); color: #721c24; }
.alert-warning { background: #fff3cd; border-color: var(--accent); color: #856404; }
.alert-info { background: #d1ecf1; border-color: #17a2b8; color: #0c5460; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-dark { background: var(--dark); color: white; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; border: 3px solid var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.15); display: inline-block; }
.avatar-sm { width: 36px; height: 36px; min-width: 36px; }
.avatar-md { width: 56px; height: 56px; min-width: 56px; }
.avatar-lg { width: 80px; height: 80px; min-width: 80px; }
.avatar-xl { width: 120px; height: 120px; min-width: 120px; }
.avatar-placeholder { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; border-radius: 50%; }

/* Sections */
.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }
.section-lg { padding: 6rem 0; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { margin-bottom: 0.75rem; }
.section-title p { max-width: 600px; margin: 0 auto; }
.section-title .section-line { width: 50px; height: 4px; background: var(--primary); border-radius: 2px; margin: 0.75rem auto 0; }
.page-hero { background: linear-gradient(135deg,var(--dark) 0%,var(--dark-2) 100%); color: white; padding: 4rem 0 3rem; text-align: center; }
.page-hero h1, .page-hero h2 { color: white; }
.page-hero p { color: rgba(255,255,255,0.8); }

/* Stats */
.stats-bar { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.stat-item { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn { padding: 0.7rem 1.25rem; font-weight: 600; font-size: 0.9rem; color: var(--gray-600); border: none; background: transparent; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); white-space: nowrap; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }

/* Footer */
.main-footer { background: var(--dark); color: rgba(255,255,255,0.8); padding: 4rem 0 2rem; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .logo { font-size: 1.6rem; font-weight: 800; color: white; }
.footer-brand .logo span { color: var(--primary); }
.footer-tagline { color: rgba(255,255,255,0.6); margin-top: 0.75rem; font-size: 0.9rem; }
.footer-section h3 { color: white; font-size: 1rem; margin-bottom: 1.25rem; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.92rem; }
.footer-links a:hover { color: var(--primary); }
.social-links { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.social-icon { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: var(--transition); }
.social-icon:hover { background: var(--primary); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.88rem; }
.newsletter-form { display: flex; gap: 0.5rem; margin-top: 1rem; }
.newsletter-form input { flex: 1; padding: 0.65rem 1rem; border-radius: var(--radius-xl); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: white; font-size: 0.88rem; outline: none; }
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-form button { padding: 0.65rem 1.25rem; background: var(--primary); color: white; border: none; border-radius: var(--radius-xl); cursor: pointer; font-weight: 600; font-size: 0.88rem; white-space: nowrap; transition: var(--transition); }
.newsletter-form button:hover { background: var(--primary-dark); }

/* Spinner & Animations */
.spinner { width: 40px; height: 40px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: white !important; }
.text-dark { color: var(--dark) !important; }
.text-success { color: var(--primary) !important; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.mt-1 { margin-top: 0.5rem !important; } .mt-2 { margin-top: 1rem !important; } .mt-3 { margin-top: 1.5rem !important; } .mt-4 { margin-top: 2rem !important; }
.mb-1 { margin-bottom: 0.5rem !important; } .mb-2 { margin-bottom: 1rem !important; } .mb-3 { margin-bottom: 1.5rem !important; } .mb-4 { margin-bottom: 2rem !important; }
.p-2 { padding: 1rem; } .p-3 { padding: 1.5rem; } .p-4 { padding: 2rem; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 50%; }
.overflow-hidden { overflow: hidden; }
.position-relative { position: relative; }
.img-cover { object-fit: cover; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Pagination */
.pagination { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.page-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--gray-300); border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; color: var(--dark); cursor: pointer; transition: var(--transition); background: white; }
.page-btn:hover, .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Stars */
.stars { color: #f39c12; }
.stars-empty { color: var(--gray-300); }

/* Breadcrumb */
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; font-size: 0.88rem; color: var(--gray-600); flex-wrap: wrap; padding: 0.75rem 0; }
.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-400); }

/* Tags */
.tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { padding: 4px 12px; border-radius: 20px; background: var(--gray-100); color: var(--gray-700); font-size: 0.82rem; font-weight: 500; border: 1px solid var(--gray-300); transition: var(--transition); cursor: pointer; }
.tag:hover, .tag-active { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: var(--transition); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: white; border-radius: var(--radius-lg); max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: scale(0.95); transition: var(--transition); }
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; gap: 0.75rem; justify-content: flex-end; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--gray-500); line-height: 1; padding: 0.25rem; }

/* User Dropdown */
.user-dropdown { position: relative; }
.user-dropdown-menu { position: absolute; top: calc(100% + 8px); right: 0; background: white; border-radius: var(--radius-lg); min-width: 210px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--transition); z-index: 500; }
.user-dropdown:hover .user-dropdown-menu, .user-dropdown.open .user-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-menu a { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1.25rem; color: var(--text); font-size: 0.9rem; transition: var(--transition); }
.user-dropdown-menu a i { width: 16px; text-align: center; color: var(--gray-500); }
.user-dropdown-menu a:hover { background: var(--gray-100); color: var(--primary); }
.user-dropdown-menu .divider { height: 1px; background: var(--gray-200); margin: 0.25rem 0; }

/* Dashboard Layout */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.sidebar { background: var(--card-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: calc(var(--navbar-h) + 1rem); }
.sidebar-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.25rem; color: var(--text-muted); font-size: 0.92rem; font-weight: 500; transition: var(--transition); border-left: 3px solid transparent; }
.sidebar-nav a:hover { background: var(--gray-100); color: var(--primary); border-left-color: var(--primary); }
.sidebar-nav a.active { background: var(--primary-light); color: var(--primary-dark); border-left-color: var(--primary); font-weight: 600; }
.sidebar-nav a i { width: 18px; text-align: center; }
.sidebar-divider { height: 1px; background: var(--gray-200); margin: 0.25rem 0; }

/* Profile */
.profile-cover { height: 200px; background: linear-gradient(135deg,#667eea,#764ba2); position: relative; }
.profile-cover-img { width: 100%; height: 100%; object-fit: cover; }
.profile-header { background: var(--card-bg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 0 1.5rem 1.5rem; box-shadow: var(--shadow); }
.profile-avatar-wrapper { position: relative; margin-top: -60px; display: inline-block; }
.profile-avatar-xl { width: 120px; height: 120px; border-radius: 50%; border: 5px solid white; box-shadow: 0 4px 20px rgba(0,0,0,0.15); object-fit: cover; }
.profile-level-badge { position: absolute; bottom: 2px; right: 2px; background: var(--primary); color: white; border-radius: 20px; padding: 2px 8px; font-size: 0.7rem; font-weight: 700; border: 2px solid white; }

/* Comments */
.comments-section { margin-top: 3rem; }
.comment-form-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; box-shadow: var(--shadow); }
.comment-item { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--gray-200); }
.comment-item:last-child { border-bottom: none; }
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 0.92rem; color: var(--dark); }
.comment-time { font-size: 0.82rem; color: var(--gray-500); }
.comment-text { font-size: 0.92rem; color: var(--text); line-height: 1.6; margin-top: 0.4rem; }
.comment-actions { display: flex; gap: 1rem; margin-top: 0.6rem; }
.comment-action-btn { background: none; border: none; font-size: 0.82rem; color: var(--gray-500); cursor: pointer; display: flex; align-items: center; gap: 0.3rem; transition: var(--transition); }
.comment-action-btn:hover { color: var(--primary); }
.comment-replies { margin-left: 3.5rem; border-left: 2px solid var(--gray-200); padding-left: 1rem; margin-top: 0.75rem; }
.auth-prompt-box { text-align: center; padding: 2rem; background: var(--gray-100); border-radius: var(--radius-lg); }

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-layout { grid-template-columns: 220px 1fr; }
    .footer-content { grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 768px) {
    .container,.container-sm,.container-lg { padding: 0 1rem; }
    .section { padding: 3rem 0; }
    .section-lg { padding: 4rem 0; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2,1fr); }
    .grid-4 { grid-template-columns: repeat(2,1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .newsletter-form { flex-direction: column; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .stats-bar { gap: 1rem; }
    .stat-number { font-size: 1.6rem; }
    .page-hero { padding: 2.5rem 0 2rem; }
}
@media (max-width: 480px) {
    .grid-3,.grid-4 { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .card-body { padding: 1.25rem; }
    h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
    .profile-avatar-xl { width: 90px; height: 90px; }
    .comment-replies { margin-left: 1.5rem; }
    .modal { border-radius: var(--radius); }
}

/* Dark Mode */
[data-theme="dark"] {
    --body-bg: #0f1923;
    --card-bg: #1a2634;
    --text: #e2e8f0;
    --text-muted: #a0aec0;
    --dark: #f0f4f8;
    --border: #2d3748;
    --gray-100: #1e2d3d;
    --gray-200: #2d3748;
    --gray-300: #3d4f61;
    --gray-500: #718096;
    --white: #1a2634;
}
[data-theme="dark"] .card { border: 1px solid var(--border); }
[data-theme="dark"] .form-control { background: var(--gray-100); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .modal { background: #1a2634; }
[data-theme="dark"] .sidebar { border: 1px solid var(--border); }
[data-theme="dark"] .page-btn { background: var(--gray-100); color: var(--text); border-color: var(--border); }