/* BytePedia Main Stylesheet */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #6c757d;
    --bg-light: #f8f9fa;
    --bg-dark: #0f0f1a;
    --font-family: 'Inter', sans-serif;
    --glass-bg: rgba(255,255,255,0.85);
    --card-shadow: 0 4px 20px rgba(0,0,0,0.06);
    --card-radius: 16px;
    --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    background: #ffffff;
    color: #1a1a2e;
    transition: var(--transition);
    padding-top: 76px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Dark Mode Toggle Switch */
.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.theme-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    margin: 0;
}

.theme-switch .slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 26px;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.theme-switch .slider i {
    font-size: 0.55rem;
    z-index: 2;
    transition: 0.3s;
    position: absolute;
}

.theme-switch .slider .fa-sun {
    left: 6px;
    color: #f39c12;
    opacity: 1;
}

.theme-switch .slider .fa-moon {
    right: 6px;
    color: #f39c12;
    opacity: 0;
}

.theme-switch input:checked + .slider .fa-sun {
    opacity: 0;
}

.theme-switch input:checked + .slider .fa-moon {
    opacity: 1;
}

.theme-switch .slider::before {
    content: '';
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    z-index: 1;
}

.theme-switch input:checked + .slider {
    background: rgba(13,110,253,0.3);
}

.theme-switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* Glass Navbar */
.glass-nav {
    background: rgba(26, 29, 35, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 12px 0;
}

.glass-nav .navbar-brand { font-size: 1.5rem; letter-spacing: -0.5px; }

.glass-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 10px;
    transition: var(--transition);
}

.glass-nav .nav-link:hover,
.glass-nav .nav-link.active {
    background: rgba(13,110,253,0.15);
    color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(13,110,253,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, #ffffff, transparent);
    pointer-events: none;
}

.hero-illustration {
    filter: drop-shadow(0 20px 40px rgba(13,110,253,0.2));
}

.min-vh-80 { min-height: 80vh; }

/* Search Box */
.search-box-hero .input-group {
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.search-box-hero .input-group-text { border: none; background: #fff; }

.search-box-hero .form-control {
    border: none;
    padding: 0.8rem 0;
    font-size: 1rem;
    background: transparent;
}

.search-box-hero .form-control:focus { box-shadow: none; }

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    transition: var(--transition);
}

.suggestion-item:hover { background: var(--bg-light); }

.suggestion-item img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.suggestion-item span { flex: 1; font-size: 0.9rem; font-weight: 500; }
.suggestion-item small { color: var(--secondary); font-size: 0.8rem; }

/* Stats Section */
.stats-section { background: var(--bg-light); }

.stat-card {
    background: #fff;
    border-radius: var(--card-radius);
    transition: var(--transition);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow); }

/* Category Cards */
.category-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}

.category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,0.08);
    border-radius: 14px;
    margin: 0 auto;
    transition: var(--transition);
}

.category-card:hover .category-icon { background: rgba(13,110,253,0.15); }

.category-large-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
}

.category-large-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}

.category-icon-lg {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,0.08);
    border-radius: 16px;
}

/* Software Cards */
.software-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.software-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.software-card.featured { border-color: var(--primary); border-width: 2px; }

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.software-icon {
    width: 56px;
    height: 56px;
    object-fit: cover;
    flex-shrink: 0;
}

.software-icon-lg {
    width: 72px;
    height: 72px;
    object-fit: cover;
}

/* Software Detail */
.software-detail-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.software-detail-icon {
    width: 96px;
    height: 96px;
    object-fit: cover;
    flex-shrink: 0;
}

.download-section {
    background: linear-gradient(135deg, rgba(13,110,253,0.05), rgba(13,110,253,0.1));
    border: 1px solid rgba(13,110,253,0.1);
}

.screenshot-thumb {
    height: 140px;
    width: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}

.screenshot-thumb:hover { transform: scale(1.02); }

.software-description { line-height: 1.8; color: #4a4a5a; }

.software-sidebar { position: sticky; top: 90px; }

.sidebar-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.sidebar-info > div { border-bottom: 1px solid rgba(0,0,0,0.04); }
.sidebar-info > div:last-child { border-bottom: none; }

/* Review Items */
.review-item {
    background: var(--bg-light);
    border: 1px solid rgba(0,0,0,0.04);
}

.review-item:last-child { margin-bottom: 0; }

/* Star Rating */
.star-rating { display: inline-flex; gap: 2px; font-size: 0.85rem; }

.star-rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }

.star-rating-input input { display: none; }

.star-rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ddd;
    transition: var(--transition);
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #ffc107;
}

/* Blog Cards */
.blog-card {
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
}

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

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.blog-card:hover .blog-image img { transform: scale(1.05); }

.blog-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-detail-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.blog-content { line-height: 1.9; }
.blog-content img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }

.comment-item { background: var(--bg-light); }

/* Auth Pages */
.auth-section {
    background: linear-gradient(135deg, var(--bg-light), #fff);
}

.auth-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* Dashboard */
.dashboard-sidebar {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 90px;
}

.dashboard-nav .nav-link {
    color: #495057;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dashboard-nav .nav-link:hover,
.dashboard-nav .nav-link.active {
    background: rgba(13,110,253,0.08);
    color: var(--primary);
}

.dashboard-stat, .dashboard-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

/* Testimonials */
.testimonial-card {
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.testimonial-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.15) !important; }

/* Contact */
.contact-card, .contact-info-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,0.08);
    border-radius: 12px;
    font-size: 1.1rem;
}

/* Footer */
.footer-section {
    background: #1a1d23;
    color: rgba(255,255,255,0.8);
}

.footer-top { border-bottom: 1px solid rgba(255,255,255,0.06); }

.footer-bottom { background: rgba(0,0,0,0.2); }

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.footer-links a:hover { color: var(--primary); padding-left: 3px; }

.social-links .btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(13,110,253,0.3);
}

/* Section Padding */
.section-padding { padding: 80px 0; }

/* Page Header */
.page-header {
    background: linear-gradient(180deg, var(--bg-light), #fff);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* Breadcrumb */
.breadcrumb { background: transparent; padding: 0; margin: 0; font-size: 0.85rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--secondary); }

/* Accordion */
.accordion-item {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px !important;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    box-shadow: none !important;
    background: #fff;
}

.accordion-button:not(.collapsed) {
    background: rgba(13,110,253,0.04);
    color: var(--primary);
}

/* Notification Item */
.notification-item, .ticket-item {
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
}

.notification-item:hover, .ticket-item:hover { background: var(--bg-light); }

/* Animations */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* Counter Animation */
.counter { display: inline-block; }

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* Responsive */
@media (max-width: 991px) {
    .hero-section { min-height: auto; padding: 80px 0 40px; }
    .section-padding { padding: 50px 0; }
}

@media (max-width: 767px) {
    body { padding-top: 66px; }
    .section-padding { padding: 40px 0; }
    .hero-section { padding: 60px 0 30px; }
    .software-detail-icon { width: 64px; height: 64px; }
}

@media (max-width: 575px) {
    .hero-section h1 { font-size: 2rem; }
    .search-box-hero .input-group { border-radius: 30px; }
    .software-icon { width: 44px; height: 44px; }
}

/* NewsLetter */
.newsletter-form .input-group {
    border-radius: 50px;
    overflow: hidden;
}
