:root {
    --bs-body-bg: #0f0f0f;
    --bs-body-color: #e0e0e0;
    --bs-primary: #6366f1;
    --bs-secondary: #64748b;
    --bs-dark: #1a1a1a;
    --bs-border-color: #2a2a2a;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #6366f1 #1a1a1a;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #1a1a1a;
}

*::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 4px;
}

body {
    background-color: #0f0f0f;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1 !important;
    letter-spacing: -0.5px;
}

.nav-search {
    position: relative;
    flex: 1;
    max-width: 300px;
    margin: 0 1rem;
}

.nav-search input {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-search input::placeholder {
    color: #888;
}

.nav-search input:focus {
    outline: none;
    border-color: #6366f1;
    background-color: #333;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.toggle-favorites {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #3a3a3a;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
    padding: 2px;
}

.toggle-switch.active {
    background-color: #6366f1;
}

.toggle-switch span {
    display: block;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 10px;
    transition: transform 0.2s;
    transform: translateX(0);
}

.toggle-switch.active span {
    transform: translateX(20px);
}

/* Dropdown */
.nav-menu .dropdown-toggle {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-menu .dropdown-toggle:hover {
    background-color: #3a3a3a;
    border-color: #6366f1;
    color: #6366f1;
}

.nav-menu .dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
}

.nav-menu .dropdown-menu {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.nav-menu .dropdown-item {
    color: #e0e0e0;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.nav-menu .dropdown-item:hover {
    background-color: #2a2a2a;
    color: #6366f1;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (max-width: 576px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1025px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card */
.youtuber-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    position: relative;
}

.youtuber-card:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    aspect-ratio: 1;
    width: 100%;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s;
}

.youtuber-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-favorite-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.card-favorite-badge:hover {
    background-color: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.card-favorite-badge.active {
    background-color: #6366f1;
    border-color: #fbbf24;
}

/* Card Content */
.card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: #fff;
    line-height: 1.3;
    word-break: break-word;
}

/* Hidden h1 for SEO - maintains proper heading hierarchy */
.card-body .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.card-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-chip {
    background-color: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-chip strong {
    color: #6366f1;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-content {
    flex: 1;
    background-color: #6366f1;
    border: none;
    color: white;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-content:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    text-decoration: none;
}

.btn-content:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.btn-info {
    width: 40px;
    height: auto;
    padding: 0.625rem;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #a5b4fc;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-info:hover {
    background-color: #3a3a3a;
    border-color: #6366f1;
    color: #6366f1;
}

.btn-info:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Pagination */
#pagination {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.pagination {
    --bs-pagination-color: #e0e0e0;
    --bs-pagination-bg: #1a1a1a;
    --bs-pagination-border-color: #2a2a2a;
    --bs-pagination-hover-color: #6366f1;
    --bs-pagination-hover-bg: #2a2a2a;
    --bs-pagination-focus-color: #6366f1;
    --bs-pagination-focus-bg: #2a2a2a;
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: #6366f1;
    --bs-pagination-active-border-color: #6366f1;
    --bs-pagination-disabled-color: #6c757d;
    --bs-pagination-disabled-bg: #1a1a1a;
    --bs-pagination-disabled-border-color: #2a2a2a;
}

.page-link {
    color: #e0e0e0;
    background-color: #1a1a1a;
    border-color: #2a2a2a;
    transition: all 0.2s;
}

.page-link:hover {
    color: #6366f1;
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

.page-item.active .page-link {
    background-color: #6366f1;
    border-color: #6366f1;
    color: white;
}

.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Modal */
.modal-custom {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-custom.show {
    display: flex;
}

.modal-custom-content {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-custom-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-custom-close:hover {
    color: #6366f1;
}

.modal-custom-close:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.modal-custom-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    padding-right: 2rem;
}

.modal-custom-text {
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.modal-custom-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.modal-custom-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #2a2a2a;
    color: #6366f1;
    padding: 0.625rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid #3a3a3a;
}

.modal-custom-link:hover {
    background-color: #3a3a3a;
    border-color: #6366f1;
}

.modal-custom-link:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Header */
header {
    background-color: #0a0a0a;
    border-bottom: 1px solid #2a2a2a;
}

.header-content {
    padding: 1.5rem;
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    color: #888;
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

@media (max-width: 576px) {
    .header-title {
        font-size: 1.5rem;
    }

    .nav-search {
        max-width: 100%;
        margin: 0.75rem 0;
    }

    .toggle-favorites {
        font-size: 0.9rem;
    }
}

/* Footer */
footer {
    background-color: #0a0a0a;
    border-top: 1px solid #2a2a2a;
    padding: 2rem 0;
    margin-top: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Container */
.container-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 576px) {
    .container-main {
        padding: 0 1rem;
    }
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
}

/* ========== Share Buttons ========== */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 130px;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-twitter  { background-color: #000;    color: #fff; }
.share-twitter:hover  { background-color: #222;    color: #fff; }

.share-whatsapp { background-color: #25d366; color: #fff; }
.share-whatsapp:hover { background-color: #1ebe57; color: #fff; }

.share-telegram { background-color: #0088cc; color: #fff; }
.share-telegram:hover { background-color: #0077b5; color: #fff; }

.share-facebook { background-color: #1877f2; color: #fff; }
.share-facebook:hover { background-color: #1463ce; color: #fff; }

.share-copy {
    background-color: #2a2a2a;
    color: #a5b4fc;
    border: 1px solid #3a3a3a !important;
}
.share-copy:hover {
    background-color: #3a3a3a;
    border-color: #6366f1 !important;
    color: #6366f1;
}
