:root {
    --primary: #FFD500;
    --primary-dark: #E6C000;
    --secondary: #000000;
    --background: #F5F5F5;
    --card-bg: #FFFFFF;
    --text: #333333;
    --text-muted: #666666;
    --text-light: #999999;
    --border: #E8E8E8;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-btn: 0 4px 15px rgba(255,213,0,0.4);
    --radius: 25px;
    --radius-sm: 15px;
    --radius-pill: 50px;
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #FFD500 0%, #FF8C00 50%, #FF4500 100%);
    --header-height: 60px;
    --announcement-height: 36px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Announcement Bar */
.announcement-bar {
    background: var(--secondary);
    color: var(--primary);
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1050;
    letter-spacing: 0.3px;
}

/* Header */
.main-header {
    background: var(--card-bg);
    height: var(--header-height);
    box-shadow: var(--shadow);
    z-index: 1040;
    top: var(--announcement-height);
}

.header-inner { height: var(--header-height); }

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--secondary);
    box-shadow: var(--shadow-btn);
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--secondary);
}

.brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: var(--secondary);
}

.badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FF3B30;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    padding: 40px 20px 30px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 24px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.stat-pill {
    background: var(--card-bg);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.stat-pill .stat-value {
    color: var(--secondary);
    font-weight: 800;
}

/* Search */
.search-section {
    padding: 0 20px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 50px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 1rem;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 4px 25px rgba(255,213,0,0.25);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.active { display: block; }

.search-result-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.search-result-item:hover { background: var(--background); }
.search-result-item:last-child { border-bottom: none; }

.search-history {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-chip {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.history-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--secondary);
}

/* Category Tabs */
.category-section {
    padding: 10px 0 20px;
    position: sticky;
    top: calc(var(--header-height) + var(--announcement-height));
    background: var(--background);
    z-index: 1030;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    border: none;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;
}

.category-tab:hover { transform: translateY(-1px); }

.category-tab.active {
    background: var(--primary);
    color: var(--secondary);
    box-shadow: var(--shadow-btn);
}

/* Tool Grid */
.tools-section {
    padding: 0 16px 100px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 576px) {
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .tools-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
    .tools-grid { grid-template-columns: repeat(6, 1fr); }
}

.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: none;
    width: 100%;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.tool-card .favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
    z-index: 2;
}

.tool-card .favorite-btn.active,
.tool-card .favorite-btn:hover { color: var(--primary); }

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.5rem;
    color: white;
}

.tool-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.tool-creator {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.tool-type {
    font-size: 0.7rem;
    color: var(--text-light);
    background: var(--background);
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
}

.tool-card.locked::after {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.85);
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FAB Panel */
.fab-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1030;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(255,213,0,0.5);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.fab-main:hover { transform: scale(1.05); }
.fab-main.active { transform: rotate(45deg); }

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-item:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: scale(1.1);
}

/* Glass Popup */
.glass-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.glass-popup.active { display: flex; }

.glass-popup-content {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

.glass-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Slide Drawer */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1070;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer-overlay.active { opacity: 1; visibility: visible; }

.slide-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--card-bg);
    z-index: 1080;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(0,0,0,0.15);
}

.slide-drawer.active { left: 0; }

.drawer-header {
    padding: 24px 20px;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.drawer-user { display: flex; align-items: center; gap: 12px; }

.drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary);
    overflow: hidden;
}

.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.drawer-user-info strong { display: block; font-size: 1rem; }
.drawer-user-info small { color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.drawer-login-link { color: var(--primary); font-size: 0.85rem; text-decoration: none; }

.drawer-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.drawer-menu {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.drawer-link:hover { background: var(--background); color: var(--secondary); }
.drawer-emoji { font-size: 1.2rem; width: 28px; text-align: center; }

/* Tool Modal */
.tool-modal-content {
    border-radius: var(--radius);
    border: none;
    overflow: hidden;
}

.tool-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 16px;
}

.tool-detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

.tool-detail-meta {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tool-detail-desc {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tool-detail-instructions {
    background: var(--background);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.tool-detail-instructions h6 {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-ybt {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-btn);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ybt:hover {
    background: var(--primary-dark);
    color: var(--secondary);
    transform: translateY(-2px);
}

.btn-ybt-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-ybt-outline:hover {
    border-color: var(--primary);
    color: var(--secondary);
}

.btn-ybt-danger {
    background: #FF3B30;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.access-pending {
    text-align: center;
    padding: 30px;
}

.access-pending i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    margin-top: auto;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.footer-tagline { font-size: 0.9rem; }

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* Page Layouts */
.page-header {
    padding: 30px 20px 20px;
    text-align: center;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.content-section {
    padding: 0 20px 100px;
    max-width: 900px;
    margin: 0 auto;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--secondary);
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control-ybt {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    background: var(--background);
}

.form-control-ybt:focus {
    border-color: var(--primary);
    background: var(--card-bg);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .dashboard-stats { grid-template-columns: repeat(4, 1fr); }
}

.dash-stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.dash-stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
}

.dash-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-header {
    text-align: center;
    padding: 30px 20px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary);
    margin: 0 auto 16px;
    box-shadow: var(--shadow-btn);
    overflow: hidden;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Notifications */
.notification-item {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 14px;
    transition: var(--transition);
}

.notification-item.unread {
    border-left: 4px solid var(--primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notification-icon.broadcast { background: var(--gradient-purple); color: white; }
.notification-icon.approval { background: #34C759; color: white; }
.notification-icon.tool_update { background: var(--gradient-blue); color: white; }
.notification-icon.system { background: var(--primary); color: var(--secondary); }

/* History */
.history-item {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-item-info { flex: 1; }
.history-item-info strong { display: block; font-size: 0.9rem; }
.history-item-info small { color: var(--text-muted); font-size: 0.8rem; }

.history-delete {
    background: none;
    border: none;
    color: #FF3B30;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
}

/* Contact & Channels */
.link-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.link-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-hover);
    color: var(--secondary);
}

.link-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.link-card-icon.whatsapp { background: #25D366; }
.link-card-icon.telegram { background: #0088cc; }
.link-card-icon.facebook { background: #1877F2; }
.link-card-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.link-card-icon.email { background: #EA4335; }
.link-card-icon.discord { background: #5865F2; }
.link-card-icon.youtube { background: #FF0000; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-light);
}

/* Loading */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner-ybt {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Alert */
.alert-ybt {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-ybt.success { background: #D4EDDA; color: #155724; }
.alert-ybt.error { background: #F8D7DA; color: #721C24; }
.alert-ybt.info { background: #FFF3CD; color: #856404; }

/* No results */
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}
