/* ============================================
   OgenSync Files - Premium Dark Theme
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #667eea;
    --primary-light: #7b8ff5;
    --primary-dark: #5a6fd6;

    /* Accent Colors */
    --accent: #00d4ff;
    --accent-light: #33ddff;
    --accent-dark: #00b8e0;

    /* Background Colors */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c7c;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #667eea 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);

    /* Border */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(102, 126, 234, 0.5);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Navbar - Dark Glass Effect
   ============================================ */
.navbar {
    background: rgba(10, 10, 15, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.98) !important;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
}

.navbar-brand i {
    color: var(--primary) !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(102, 126, 234, 0.1);
}

.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-secondary) !important;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.15) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   Hero Sections
   ============================================ */
.bg-gradient-primary {
    background: var(--gradient-hero) !important;
    position: relative;
    overflow: hidden;
}

.bg-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    pointer-events: none;
}

/* ============================================
   Cards - Glassmorphism
   ============================================ */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    transition: var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover) !important;
    box-shadow: var(--shadow-glow);
}

.card-body {
    color: var(--text-primary);
}

.feature-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker)) !important;
}

.feature-card:hover {
    background: linear-gradient(145deg, var(--bg-card-hover), var(--bg-card)) !important;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-outline-primary {
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: white !important;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.btn-light {
    background: white !important;
    color: var(--bg-dark) !important;
}

.btn-light:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px);
}

/* ============================================
   Forms
   ============================================ */
.form-control,
.form-select {
    background: var(--bg-darker) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
    background: var(--bg-card) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ============================================
   Sections
   ============================================ */
section {
    position: relative;
}

.bg-light {
    background: var(--bg-darker) !important;
}

.features-section,
.pricing-preview,
.how-it-works {
    background: var(--bg-dark);
}

.how-it-works {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

/* ============================================
   Code Preview
   ============================================ */
.code-preview {
    background: linear-gradient(145deg, #1a1a25, #0f0f18) !important;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

pre {
    background: var(--bg-darker) !important;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
}

pre code {
    color: var(--text-primary);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 8px;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: linear-gradient(180deg, var(--bg-dark), var(--bg-darker)) !important;
    border-top: 1px solid var(--border-color);
}

.footer a {
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary) !important;
}

.hover-light:hover {
    color: var(--text-primary) !important;
}

/* ============================================
   Tables
   ============================================ */
.table {
    color: var(--text-primary);
}

.table th {
    border-color: var(--border-color) !important;
    color: var(--text-secondary);
    font-weight: 600;
}

.table td {
    border-color: var(--border-color) !important;
}

/* ============================================
   Accordion
   ============================================ */
.accordion-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.accordion-button {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: rgba(102, 126, 234, 0.1) !important;
    color: var(--primary) !important;
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    background: var(--bg-card);
    color: var(--text-secondary);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    border-radius: 12px;
    border: none;
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
    border-left: 4px solid var(--accent);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-left: 4px solid #10b981;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-left: 4px solid #f59e0b;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: var(--gradient-primary) !important;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse 15s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

/* ============================================
   Documentation Specific
   ============================================ */
.docs-sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    overflow-y: auto;
}

.docs-nav .nav-link {
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 2px;
}

.docs-nav .nav-link:hover,
.docs-nav .nav-link.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary) !important;
}

.docs-content h2 {
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.docs-content h2:first-child {
    border-top: none;
    padding-top: 0;
}

/* ============================================
   Utilities
   ============================================ */
.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.border-secondary {
    border-color: var(--border-color) !important;
}

.bg-dark {
    background: var(--bg-dark) !important;
}

.bg-primary {
    background: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slideIn {
    animation: slideIn 0.6s ease forwards;
}

/* Stagger animation delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* ============================================
   Feature Icons
   ============================================ */
.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(102, 126, 234, 0.1);
}

.bg-primary.bg-opacity-10 {
    background: rgba(102, 126, 234, 0.1) !important;
}

.bg-success.bg-opacity-10 {
    background: rgba(16, 185, 129, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
    background: rgba(245, 158, 11, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background: rgba(0, 212, 255, 0.1) !important;
}

.bg-danger.bg-opacity-10 {
    background: rgba(239, 68, 68, 0.1) !important;
}

.bg-purple.bg-opacity-10 {
    background: rgba(139, 92, 246, 0.1) !important;
}

.text-purple {
    color: #8b5cf6 !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    .card:hover {
        transform: none;
    }
}

/* ============================================
   Page-Specific Styles
   ============================================ */

/* Contact Page */
.contact-info-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-normal);
}

.contact-info-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.contact-info-card i {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Docs Page */
.param-table {
    font-size: 0.9rem;
}

.param-table code {
    background: rgba(102, 126, 234, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--accent);
}

.example-card {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.example-card .nav-tabs {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.example-card .nav-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
}

.example-card .nav-tabs .nav-link.active {
    background: transparent;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* ============================================
   Dashboard Layout
   ============================================ */
.dashboard-body {
    background: var(--bg-darker);
    min-height: 100vh;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--bg-dark) !important;
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color) !important;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sidebar-nav .nav-link {
    color: var(--text-secondary) !important;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.sidebar-nav .nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary) !important;
}

.sidebar-nav .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 10px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color) !important;
    margin-top: auto;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header h4 {
    color: var(--text-primary);
}

.dashboard-main {
    flex: 1;
    padding: 1.5rem;
    background: var(--bg-darker);
}

/* Dashboard Cards */
.dashboard-main .card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

.dashboard-main .card:hover {
    transform: none;
}

.dashboard-main .card-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary);
}

.dashboard-main .bg-white {
    background: var(--bg-card) !important;
}

.dashboard-main .bg-light {
    background: var(--bg-darker) !important;
}

/* Plan Info */
.plan-info {
    background: var(--bg-darker) !important;
    border-radius: 12px;
    padding: 1rem;
}

/* Image Thumbnails */
.image-thumb {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.image-thumb:hover {
    border-color: var(--primary);
}

/* Mobile Sidebar Toggle */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .dashboard-content {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* Dashboard Stats Cards */
.dashboard-main .col-xl-3 .card {
    transition: var(--transition-fast);
}

.dashboard-main .col-xl-3 .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Modal Styling for Dashboard */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
}

.modal-title {
    color: var(--text-primary);
}

.btn-close {
    filter: invert(1);
}