:root {
    --accent-color: #0088cc;
    --text-primary: #ffffff;
    --bg-primary: rgba(255,255,255,0.08);
    --card-bg: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.1);
    --bg-gradient: linear-gradient(135deg, #0a0f1a 0%, #0d1b2e 50%, #0a0f1a 100%);
}

[data-theme="dark"] {
    --text-primary: #ffffff;
    --bg-primary: rgba(255,255,255,0.08);
    --card-bg: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.1);
}

[data-theme="light"] {
    --text-primary: #1a1a2e;
    --bg-primary: #ffffff;
    --card-bg: rgba(255,255,255,0.85);
    --border: rgba(0,0,0,0.08);
}

body {
    background: linear-gradient(135deg, #0a0f1a 0%, #0d1b2e 50%, #0a0f1a 100%);
    background-attachment: fixed;
    margin: 0;
    color: var(--text-primary);
    transition: color 0.3s, background 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 50%, #e8f0fe 100%);
    background-attachment: fixed;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

.theme-icon {
    width: 32px;
    height: 32px;
    position: absolute;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.theme-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.5;
    pointer-events: none;
    transition: transform 0.6s ease-out, opacity 0.4s ease-out;
}

.theme-wave.active {
    transform: translate(-50%, -50%) scale(30);
    opacity: 0;
}

header div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 70px;
    width: auto;
    margin-left: -10px;
}

header {
    border-radius: 0 0 10px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 8px 15px;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.85);
}

.submit-btn {
    background: #25a244;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    width: fit-content;
}

nav {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

nav::-webkit-scrollbar {
    display: none;
}

header nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    font-size: 13px;
    transition: all 0.3s ease;
}

header nav a.active {
    background: linear-gradient(135deg, #0088cc, #25a244);
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: 0 0 10px rgba(0,136,204,0.4);
}

[data-theme="light"] header nav a {
    background: rgba(0,0,0,0.06);
}

[data-theme="light"] header nav a.active {
    background: linear-gradient(135deg, #0088cc, #25a244);
    color: white;
}

.search-bar {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-primary);
}

.categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px;
}

.card {
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

[data-theme="light"] .card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.card h3 {
    padding: 10px 10px 5px;
    font-size: 14px;
    color: var(--text-primary);
}

.card p {
    padding: 0 10px;
    font-size: 12px;
    color: gray;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-buttons {
    display: flex;
    gap: 8px;
    padding: 10px;
}

.card-buttons a {
    text-decoration-line: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    background: #0088cc;
    color: white;
}

.card-buttons a:last-child {
    background: #25a244;
}

.card-img {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #0088cc, #25a244);
    border-radius: 10px 10px 0 0;
}

.section-title {
    padding: 10px 15px;
    font-size: 18px;
    color: var(--text-primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge.telegram { background: rgba(0,136,204,0.2); color: #0088cc; }
.badge.whatsapp { background: rgba(37,162,68,0.2); color: #25a244; }

.hero {
    text-align: center;
    padding: 5px 20px 30px;
}

.hero-logo {
    height: 120px;
    width: auto;
    margin-bottom: -10px;
}

.hero h1 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0 0 5px;
}

.hero-highlight {
    font-size: 18px;
    margin: 5px 0;
    background: linear-gradient(135deg, #0088cc, #25a244);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 14px;
    color: gray;
    margin: 5px 0;
}

.hero-search {
    display: flex;
    margin: 20px 0 15px;
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.hero-search input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, #0088cc, #25a244);
    color: white;
    border: none;
    padding: 12px 20px;
    font-weight: bold;
    cursor: pointer;
}

.hero-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.btn-started {
    background: linear-gradient(135deg, #0088cc, #25a244);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(0,136,204,0.4);
}

.btn-submit {
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
}

.btn-started, .btn-submit {
    width: 35%;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px 10px;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 18px;
}

.view-all {
    color: #25a244;
    text-decoration: none;
    font-size: 14px;
}

.trending-scroll {
    display: flex;
    gap: 12px;
    padding: 0 15px 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.trending-scroll::-webkit-scrollbar {
    display: none;
}

.trending-card {
    min-width: 140px;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.trending-card:hover {
    transform: translateY(-2px);
}

[data-theme="light"] .trending-card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.trending-img {
    height: 100px;
    background: linear-gradient(135deg, #0088cc, #25a244);
    position: relative;
}

.top-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: orange;
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
}

.trending-name {
    padding: 8px 10px 2px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.trending-desc {
    padding: 0 10px;
    font-size: 11px;
    color: gray;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 0 15px 15px;
}

.category-item {
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 5px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.category-item p {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: bold;
    margin: 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 15px 15px;
}

.why-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid var(--border);
}

.why-item i {
    font-size: 30px;
    color: #25a244;
    margin-bottom: 10px;
}

.why-item h3 {
    color: var(--text-primary);
    font-size: 14px;
    margin: 5px 0;
}

.why-item p {
    color: gray;
    font-size: 12px;
    margin: 0;
}

.bottom-nav {
    overflow: visible;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 10px 0 20px;
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 25px 25px 0 0;
    z-index: 100;
    border-top: 1px solid var(--border);
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    gap: 4px;
}

[data-theme="light"] .nav-item {
    color: rgba(0,0,0,0.4);
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    background: linear-gradient(135deg, #0088cc, #25a244);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-add {
    background: linear-gradient(135deg, #0088cc, #25a244);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(37,162,68,0.5);
    flex-shrink: 0;
    border: 4px solid rgba(10,15,26,0.5);
    position: relative;
    top: -25px;
}

.nav-add i {
    color: white;
    font-size: 24px;
}

.submit-title {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0 0 5px;
    text-align: center;
}

.submit-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 15px;
    border: 1px solid var(--border);
}

.submit-card input,
.submit-card select,
.submit-card textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-family: inherit;
}

[data-theme="dark"] .submit-card input,
[data-theme="dark"] .submit-card select,
[data-theme="dark"] .submit-card textarea {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
}

.submit-card input::placeholder {
    color: rgba(255,255,255,0.3);
}

[data-theme="light"] .submit-card input::placeholder {
    color: rgba(0,0,0,0.3);
}

.submit-card label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.submit-description {
    color: gray;
    font-size: 14px;
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.5;
}

.bot-alt-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: fit-content;
    margin: 0 auto 24px;
    padding: 10px 18px;
    background: rgba(0, 136, 204, 0.1);
    border: 1px solid rgba(0, 136, 204, 0.3);
    border-radius: 20px;
    color: #0088cc;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.bot-alt-link:hover {
    background: rgba(0, 136, 204, 0.18);
}

.bot-alt-link i {
    font-size: 15px;
}

.submit-form-btn {
    display: block;
    width: 80%;
    padding: 14px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(90deg, #0088cc, #25a244);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(37,162,68,0.4);
    transition: transform 0.2s ease;
    margin: 0 auto;
    font-family: inherit;
}

.submit-form-btn:hover {
    transform: scale(1.02);
}

.submit-footer {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    text-decoration: none;
    color: gray;
    margin: 0 10px;
}

.submit-note {
    text-align: center;
    color: gray;
}

.submit-card input:focus,
.submit-card select:focus,
.submit-card textarea:focus {
    border: 2px solid #0088cc;
    box-shadow: 0 0 10px rgba(0,136,204,0.3);
}

.dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.dropdown-selected {
    padding: 12px 15px;
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.3s ease;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

.dropdown-selected:hover {
    border-color: #0088cc;
}

.arrow {
    transition: transform 0.3s ease;
}

.dropdown-options {
    position: absolute;
    width: 100%;
    top: 110%;
    left: 0;
    background: rgba(10,15,26,0.95);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 50;
}

.dropdown-options.active {
    max-height: 300px;
    opacity: 1;
}

.option {
    padding: 12px 15px;
    cursor: pointer;
    color: white;
    transition: 0.2s ease;
}

.option:hover {
    background: rgba(0,136,204,0.2);
    color: #0088cc;
}

.stats-section {
    padding: 0 15px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.stat-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    border: 1px solid var(--border);
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    height: 1em;
    align-items: flex-end;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    animation: dot-bounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.report-btn {
    background: var(--card-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    color: inherit;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s, color 0.2s;
}

.report-btn:hover {
    opacity: 0.85;
    color: #ff6b6b;
}

.report-btn:active {
    transform: scale(0.92);
}

.report-btn:disabled {
    color: #2ecc71;
    opacity: 1;
    cursor: default;
}

.share-btn + .report-btn {
    margin-left: 6px;
}

.report-btn + .join-btn {
    margin-left: 6px;
}

.stat-item h3 {
    background: linear-gradient(135deg, #0088cc, #25a244);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 22px;
    margin: 0 0 5px;
}

.stat-item p {
    color: gray;
    font-size: 12px;
    margin: 0;
}

.policy-notes {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.policy-notes p {
    color: gray;
    font-size: 12px;
    margin: 5px 0;
}

.policy-notes p i {
    width: 14px;
    margin-right: 6px;
    color: #6c5ce7;
}

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

main {
    animation: fadeIn 0.5s ease;
    padding-bottom: 120px;
}

.explore-search {
    display: flex;
    margin: 15px;
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.explore-search input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
}

.explore-section {
    margin-bottom: 10px;
}

.empty-category {
    text-align: center;
    padding: 20px;
    color: gray;
    font-size: 14px;
    width: 100%;
}

.empty-category i {
    font-size: 30px;
    margin-bottom: 10px;
    display: block;
}

.empty-category a {
    color: #25a244;
    text-decoration: none;
}

.verified-badge {
    display: inline-block;
    margin-left: 4px;
    position: relative;
    top: 3px;
    flex-shrink: 0;
}

html {
    scroll-behavior: smooth;
}

.latest-scroll {
    display: flex;
    gap: 15px;
    padding: 0 15px 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.latest-scroll::-webkit-scrollbar {
    display: none;
}

.latest-card {
    min-width: 200px;
    max-width: 200px;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.latest-card:hover {
    transform: translateY(-2px);
}

[data-theme="light"] .latest-card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.latest-card h3 {
    padding: 10px 10px 5px;
    font-size: 14px;
    color: var(--text-primary);
}

.latest-card p {
    padding: 0 10px;
    font-size: 12px;
    color: gray;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-card .card-buttons {
    display: flex;
    gap: 8px;
    padding: 10px;
}

.simple-page {
    padding: 15px 15px 120px;
    max-width: 700px;
    margin: 0 auto;
}

.simple-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.simple-card h1 {
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 15px;
}

.simple-card h2 {
    color: var(--text-primary);
    font-size: 16px;
        margin: 20px 0 8px;
}

.simple-card p {
    color: gray;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.simple-card ul {
    color: gray;
    font-size: 14px;
    line-height: 2;
    padding-left: 15px;
}

.simple-card a {
    color: #0088cc;
    text-decoration: none;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    border: 1px solid var(--border);
}

.contact-item i {
    font-size: 24px;
    color: #0088cc;
}

.contact-item h3 {
    color: var(--text-primary);
    font-size: 14px;
    margin: 0 0 3px;
}

.contact-item p {
    color: gray;
    font-size: 13px;
    margin: 0;
}

.custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.custom-select-selected {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.custom-select-selected::after {
    content: '';
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
    margin-top: 5px;
}

.custom-select-options {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: rgba(10,15,26,0.97);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    overflow: hidden;
    z-index: 50;
    border: 1px solid var(--border);
}

[data-theme="light"] .custom-select-options {
    background: #ffffff;
}

.custom-select-options.open {
    display: block;
}

.custom-option {
    padding: 12px 15px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: background 0.2s;
}

.custom-option:hover {
    background: rgba(0,136,204,0.15);
    color: #0088cc;
}

.custom-option.selected {
    background: rgba(0,136,204,0.2);
    color: #0088cc;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #0088cc;
    background: rgba(0,136,204,0.05);
}

.upload-area p {
    color: gray;
    font-size: 13px;
    margin: 8px 0 0;
}

/* ── SKELETON ── */
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

[data-theme="light"] .skeleton {
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.05) 25%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-card {
    min-width: 200px;
    max-width: 200px;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.skeleton-img {
    width: 100%;
    height: 120px;
}

.skeleton-line {
    height: 12px;
    margin: 10px;
    border-radius: 6px;
}

.skeleton-line.short {
    width: 60px;
}

.skeleton-button {
    height: 35px;
    margin: 10px;
    border-radius: 20px;
}

/* ── SEARCH LOADING ── */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}

[data-theme="light"] .search-loading {
    color: rgba(0,0,0,0.4);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #0088cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

[data-theme="light"] .spinner {
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #0088cc;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── GROUP CARDS ── */
.group-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 140px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(108,92,231,0.4);
    z-index: 1;
}

.group-card:hover {
    transform: translateY(-2px);
    border-color: #0088cc;
}

[data-theme="light"] .group-card {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.group-card-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-start;
    flex: 1;
}
.group-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.group-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0088cc, #25a244);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.group-info {
    flex: 1;
    min-width: 0;
}

.group-info h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-info p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

[data-theme="light"] .group-info p {
    color: rgba(0,0,0,0.5);
}

.group-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    overflow: hidden;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.category-badge {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="light"] .category-badge {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.6);
}

.members-count {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

[data-theme="light"] .members-count {
    color: rgba(0,0,0,0.4);
}

.join-btn {
    margin-left: auto;
    background: linear-gradient(135deg, #0088cc, #25a244);
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.join-btn:hover {
    opacity: 0.85;
}

.share-btn {
    margin-left: auto;
    background: var(--card-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    color: inherit;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-btn:active {
    transform: scale(0.92);
}

.share-btn + .join-btn {
    margin-left: 6px;
}

.groups-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 15px 15px;
    align-items: stretch;
}

/* ── STATES ── */
.loading {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}

[data-theme="light"] .loading {
    color: rgba(0,0,0,0.4);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.4);
}

[data-theme="light"] .empty-state {
    color: rgba(0,0,0,0.4);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.3;
}

.empty-state a {
    color: #25a244;
    text-decoration: none;
    font-weight: 700;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: #ff4444;
    font-size: 14px;
}

.success-state {
    text-align: center;
    padding: 60px 20px;
}

.success-state i {
    font-size: 64px;
    color: #25a244;
    margin-bottom: 16px;
    display: block;
}

.success-state h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-state p {
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
    font-size: 14px;
}

[data-theme="light"] .success-state p {
    color: rgba(0,0,0,0.5);
}

/* ── RESPONSIVE ── */
@media (min-width: 600px) {
    .categories {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .trending-scroll,
    .latest-scroll {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        overflow-x: unset;
        padding: 0 15px 15px;
    }

    .trending-card,
    .latest-card {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }

    .skeleton-card {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }

    .categories {
        grid-template-columns: repeat(4, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-highlight {
        font-size: 22px;
    }

    main {
        max-width: 900px;
        margin: 0 auto;
    }
}

@media (min-width: 900px) {
    .groups-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 600px) {
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    main {
        max-width: 1100px;
    }
}
/* ── CATEGORY CAROUSEL ── */
.category-carousel {
    display: flex;
    gap: 12px;
    padding: 0 15px 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-carousel::-webkit-scrollbar { display: none; }

.category-carousel .group-card {
    min-width: 220px;
    max-width: 220px;
    flex-shrink: 0;
    height: auto;
    min-height: 160px;
}

/* ── SEARCH RESULTS LIST ── */
.search-results-list {
    padding: 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.search-result-item:hover { border-color: #0088cc; }

.search-result-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0088cc, #25a244);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-info h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-info p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="light"] .search-result-info p { color: rgba(0,0,0,0.5); }

.search-result-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.search-result-action { flex-shrink: 0; }

.read-more {
    color: #0088cc;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: block;
    margin-top: 4px;
}

.read-more:hover { text-decoration: underline; }
