/* ========================================
   Minimalist Dark Theme - StreamerKit
   Inspired by modern SaaS design
   ======================================== */

/* CSS Variables */
:root {
    /* Dark Theme with Vibrant Purple */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d0d12;
    --bg-card: #13131a;
    --bg-elevated: #1a1a24;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a8a8c0;
    --text-tertiary: #7878a0;
    --text-muted: #4a4a68;

    /* Accent Colors - Based on #9146ff */
    --accent-primary: #9146ff;
    --accent-hover: #7c3aed;
    --accent-light: #a770ff;
    --accent-glow: rgba(145, 70, 255, 0.5);

    /* Gradient Colors - Variations of #9146ff */
    --gradient-purple: #9146ff;
    --gradient-violet: #a770ff;
    --gradient-fuchsia: #b084ff;
    --gradient-pink: #c19aff;

    /* Border Colors */
    --border-primary: rgba(145, 70, 255, 0.1);
    --border-elevated: rgba(145, 70, 255, 0.2);
    --border-glow: rgba(145, 70, 255, 0.3);

    /* Shadows - Enhanced with Purple */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 0 15px rgba(145, 70, 255, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 0 30px rgba(145, 70, 255, 0.2);
    --shadow-glow: 0 0 40px rgba(145, 70, 255, 0.4);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Background Effects - Enhanced Purple
   ======================================== */

/* Purple Grid Pattern */
.bg-grid-pattern {
    background-image:
            linear-gradient(rgba(145, 70, 255, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(145, 70, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Dynamic Gradient Orbs */
.gradient-orb {
    animation: float-orb 25s ease-in-out infinite;
    filter: blur(80px);
}

.gradient-orb:nth-child(2) {
    animation-delay: 0s;
    animation-duration: 20s;
}

.gradient-orb:nth-child(3) {
    animation-delay: -10s;
    animation-duration: 30s;
}

.gradient-orb:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 28s;
}

.gradient-orb:nth-child(5) {
    animation-delay: -15s;
    animation-duration: 35s;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    33% {
        transform: translate(40px, -40px) scale(1.1);
        opacity: 0.5;
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
        opacity: 0.4;
    }
}

/* ========================================
   Glassmorphism - Enhanced with Purple Glow
   ======================================== */
.glass-effect {
    background: rgba(19, 19, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-primary);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.05);
}

.glass-card {
    background: linear-gradient(135deg, rgba(19, 19, 26, 0.4), rgba(26, 26, 36, 0.3));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-primary);
    transition: all 0.4s ease;
}

.glass-card:hover {
    background: linear-gradient(135deg, rgba(19, 19, 26, 0.5), rgba(26, 26, 36, 0.4));
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md), 0 0 30px rgba(145, 70, 255, 0.15);
}

/* ========================================
   Navigation Bar
   ======================================== */
.navbar {
    transition: all 0.3s ease;
}

/* ========================================
   Buttons - Enhanced with Purple Gradients
   ======================================== */
.btn {
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.btn:active {
    transform: translateY(0);
}

/* Primary Button with Gradient */
.btn-primary,
button[class*="bg-indigo"] {
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-violet)) !important;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.3);
    position: relative;
}

.btn-primary:hover,
button[class*="bg-indigo"]:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--gradient-violet)) !important;
    box-shadow: 0 6px 25px rgba(145, 70, 255, 0.5), 0 0 40px rgba(145, 70, 255, 0.3);
    transform: translateY(-2px);
}

/* Outline Button with Purple Border */
.btn-outline,
button[class*="border-gray"] {
    border-color: rgba(145, 70, 255, 0.3) !important;
    color: var(--accent-light) !important;
    background: rgba(145, 70, 255, 0.05) !important;
}

.btn-outline:hover,
button[class*="border-gray"]:hover {
    border-color: var(--accent-primary) !important;
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-violet)) !important;
    box-shadow: 0 4px 20px rgba(145, 70, 255, 0.4);
    color: white !important;
}

/* ========================================
   Cards - Enhanced with Purple Glow
   ======================================== */
.pricing-card,
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.pricing-card {
    display: flex;
    flex-direction: column;
}

.pricing-card .features {
    flex-grow: 1;
}

.pricing-card:hover,
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(145, 70, 255, 0.2);
}

.pricing-card.popular {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.08), rgba(167, 112, 255, 0.05));
    box-shadow: 0 0 40px rgba(145, 70, 255, 0.2), var(--shadow-lg);
}

.pricing-card.popular:hover {
    box-shadow: 0 0 60px rgba(145, 70, 255, 0.3), var(--shadow-lg);
    transform: translateY(-6px) scale(1.02);
}

/* Popular Badge - Enhanced with Gradient */
.popular-badge {
    z-index: 10;
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-violet)) !important;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.4), 0 0 20px rgba(145, 70, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pricing-grid {
    padding-top: 1rem;
}

/* Icon Boxes - Enhanced with Glow */
.icon-box,
.feature-icon {
    transition: all 0.4s ease;
    position: relative;
}

.feature:hover .icon-box,
.feature-card:hover .icon-box,
.feature-card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(145, 70, 255, 0.4);
}

.pricing-card.popular .icon-box {
    background: rgba(145, 70, 255, 0.15) !important;
    border-color: rgba(145, 70, 255, 0.3) !important;
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.3);
}

/* ========================================
   Loading State
   ======================================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   Notification Messages
   ======================================== */
#error-message,
#success-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Streamers Carousel Section
   ======================================== */

.streamers-carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 1.5rem 0;
}

/* Fade effect on edges */
.streamers-carousel-container::before,
.streamers-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.streamers-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, #0d0d12 0%, rgba(13, 13, 18, 0.8) 50%, transparent 100%);
}

.streamers-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, #0d0d12 0%, rgba(13, 13, 18, 0.8) 50%, transparent 100%);
}

.streamers-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll-horizontal 45s linear infinite;
    width: fit-content;
}

/* Pause on hover */
.streamers-track:hover {
    animation-play-state: paused;
}

.streamer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 140px;
    transition: transform 0.3s ease;
}

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

.streamer-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(145, 70, 255, 0.2);
    transition: all 0.4s ease;
}

.streamer-card:hover .streamer-avatar-wrapper {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.6), 0 0 15px rgba(167, 112, 255, 0.4);
    transform: scale(1.05);
}

.streamer-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.streamer-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    transition: color 0.3s ease;
}

.streamer-card:hover .streamer-name {
    color: var(--text-primary);
}

/* Infinite scroll animation */
@keyframes scroll-horizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets */
@media (max-width: 1024px) {
    .pricing-card.popular {
        transform: none;
    }

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

/* Mobile */
@media (max-width: 768px) {
    .glass-card {
        background: rgba(26, 28, 38, 0.6);
    }

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

    /* Streamers - faster animation on mobile */
    .streamers-track {
        gap: 1.25rem;
        animation-duration: 35s;
    }

    .streamer-avatar-wrapper {
        width: 80px;
        height: 80px;
    }

    .streamer-card {
        min-width: 100px;
    }

    .streamers-carousel-container {
        padding: 1rem 0;
    }

    /* Smaller fade on mobile */
    .streamers-carousel-container::before,
    .streamers-carousel-container::after {
        width: 80px;
    }
}

/* ========================================
   Pricing Features Enhancement
   ======================================== */
.pricing-card .fa-check {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 4px rgba(145, 70, 255, 0.5));
}

.pricing-card.popular .fa-check {
    color: var(--accent-light);
    filter: drop-shadow(0 0 6px rgba(145, 70, 255, 0.7));
}

/* ========================================
   Custom Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gradient-purple), var(--gradient-violet));
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-hover), var(--gradient-fuchsia));
    box-shadow: 0 0 10px rgba(145, 70, 255, 0.5);
}

/* ========================================
   Selection Color
   ======================================== */
::selection {
    background: rgba(145, 70, 255, 0.4);
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(145, 70, 255, 0.5);
}

::-moz-selection {
    background: rgba(145, 70, 255, 0.4);
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(145, 70, 255, 0.5);
}

/* ========================================
   Focus Styles for Accessibility
   ======================================== */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ========================================
   Utility Classes
   ======================================== */

/* Prevent text selection on buttons */
.btn,
button {
    -webkit-user-select: none;
    user-select: none;
}

/* Smooth image rendering */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gradient-orb,
    .streamers-track {
        animation: none;
    }

    .gradient-orb {
        opacity: 0.3 !important;
    }
}

/* GPU Acceleration */
.navbar,
.glass-card,
.glass-effect,
.btn,
.pricing-card,
.feature-card,
.streamers-track {
    will-change: transform;
    transform: translateZ(0);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .navbar,
    .gradient-orb,
    .bg-grid-pattern,
    .streamers {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* ========================================
   Modal Styles
   ======================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.modal-container {
    background: linear-gradient(135deg, rgba(19, 19, 26, 0.95), rgba(26, 26, 36, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-elevated);
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(145, 70, 255, 0.2);
    animation: slideUp 0.3s ease-out;
}

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

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: rgba(145, 70, 255, 0.1);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(145, 70, 255, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(90deg);
}

/* Modal Form */
.modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(19, 19, 26, 0.6);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(19, 19, 26, 0.8);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.1), 0 0 20px rgba(145, 70, 255, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Select placeholder styling */
.form-select option:disabled {
    color: var(--text-muted);
}

.form-select:invalid {
    color: var(--text-muted);
}

.form-select:valid {
    color: var(--text-primary);
}

/* Custom Multi-select with Checkboxes */
.custom-select-wrapper {
    position: relative;
}

.custom-select-trigger {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2.5rem !important;
}

.custom-select-trigger::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: rgba(19, 19, 26, 0.98);
    border: 1px solid var(--border-elevated);
    border-radius: 0.5rem;
    padding: 0.5rem;
    z-index: 100;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(145, 70, 255, 0.15);
    max-height: 200px;
    overflow-y: auto;
    animation: dropdownSlide 0.2s ease-out;
    transform-origin: top;
}

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

.custom-select-dropdown.hidden {
    display: none;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.checkbox-option:last-child {
    margin-bottom: 0;
}

.checkbox-option:hover {
    background: rgba(145, 70, 255, 0.1);
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--accent-primary);
    border-radius: 0.25rem;
    flex-shrink: 0;
}

/* Custom checkbox styling for Firefox */
.checkbox-option input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-violet));
    border-color: var(--accent-primary);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-label {
    color: var(--accent-light);
    font-weight: 600;
}

/* Custom Scrollbar for Dropdown */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgba(19, 19, 26, 0.5);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-secondary,
.btn-submit {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-secondary {
    background: rgba(145, 70, 255, 0.1);
    border: 1px solid var(--border-elevated);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(145, 70, 255, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-light);
    transform: translateY(-1px);
}

.btn-submit {
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-violet));
    color: white;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 6px 25px rgba(145, 70, 255, 0.5), 0 0 40px rgba(145, 70, 255, 0.3);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-container {
        max-height: 95vh;
        border-radius: 0.75rem;
    }

    .modal-header {
        padding: 1.25rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-form {
        padding: 1.25rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-submit {
        width: 100%;
    }
}

/* ========================================
   Price Blur Effect with Badge
   ======================================== */
.price-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.price-blurred {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
    opacity: 0.65;
}

.price-badge {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--gradient-purple), var(--gradient-violet));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.5), 0 0 30px rgba(145, 70, 255, 0.3);
    z-index: 10;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .price-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}
