/* Base styles */
html {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6366f1;
    --accent-hover: #818cf8;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    cursor: default;
}

/* Canvas elements */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(8px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar .cta-button {
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);  /* Match text color */
}

.navbar .cta-button i {
    transition: transform 0.3s ease;
}

.navbar .cta-button:hover i {
    transform: translateX(3px);
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* Animated heading */
.animated-heading {
    position: relative;
    perspective: 1000px;
    margin-bottom: 2rem;
}

.heading-line {
    display: block;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.2s ease-out;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

/* Rotating words animation */
.rotating-words {
    display: inline-block;
    position: relative;
    height: 4rem;
    margin-left: 0.5rem;
}

.rotating-words span {
    display: inline-block;
    position: absolute;
    text-align: left;
    left: 0;
    top: 0;
    opacity: 0;
    animation: rotateWords 8s linear infinite 0s;
    color: var(--accent);
    min-width: 280px;
}

.rotating-words span:nth-child(1) { animation-delay: 0s; }
.rotating-words span:nth-child(2) { animation-delay: 2s; }
.rotating-words span:nth-child(3) { animation-delay: 4s; }
.rotating-words span:nth-child(4) { animation-delay: 6s; }

.rotating-words span:first-child {
    position: relative;
    opacity: 1;
}

@keyframes rotateWords {
    0% { opacity: 0; transform: translateY(25px); }
    2% { opacity: 1; transform: translateY(0); }
    23% { opacity: 1; transform: translateY(0); }
    25% { opacity: 0; transform: translateY(-25px); }
    100% { opacity: 0; transform: translateY(-25px); }
}

/* CTA buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem !important;  /* Add !important */
    display: inline-flex;           /* Add this */
    align-items: center;            /* Add this */
    gap: 0.5rem;                    /* Add this */
}

.cta-button.primary {
    background-color: var(--accent);
    color: white;
    border: none;
}

.cta-button.primary:hover {
    background-color: var(--accent-hover);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
}

.cta-button.secondary:hover {
    border-color: var(--text-primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    overflow-y: auto;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: auto;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 1200px;
    width: 95%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.modal h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.modal-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Carousel */
.carousel-container {
    position: relative;
    margin: 2rem 0;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    align-items: flex-start;
    height: auto;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 2rem;
    height: auto
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background: var(--accent);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 2;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button:hover {
    opacity: 1;
}

.carousel-button.prev {
    left: 0.5rem;
}

.carousel-button.next {
    right: 0.5rem;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
}

.features-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Plans section */
.plans-section {
    margin-top: 2rem;
}

.plans-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 0.75rem;
    position: relative;
    transition: transform 0.3s ease;
}

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

.plan-card.popular {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--accent);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-header h4 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.plan-price {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 600;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.plan-features li::before {
    content: "\F26B";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.plans-cta {
    text-align: center;
    margin-top: 2rem;
}

.plans-cta .cta-button {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.plans-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Custom scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Mobile styles */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .heading-line {
        font-size: 2.5rem;
    }

    .heading-line.with-rotating {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-text {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .cta-group {
        flex-direction: row; /* Change from column to row */
        justify-content: center;
        gap: 1rem;
        padding: 0 1rem;
    }

    .cta-button {
        width: auto;
        min-width: 140px; /* Reduce min-width to fit side by side */
        max-width: none;
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem; /* Slightly smaller font size */
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal h2 {
        font-size: 1.75rem;
    }

    .modal-intro {
        font-size: 1.1rem;
        text-align: start;
    }

    .carousel-container {
        position: relative;
        overflow: hidden;
        height: auto; /* Let container height be determined by active slide */
    }

    .carousel-track {
        align-items: flex-start;
        min-height: unset;
    }

    .carousel-button {
        position: absolute;
        bottom: 0; /* Position at bottom */
        top: auto; /* Remove top positioning */
        transform: none; /* Remove transform */
        width: 36px;
        height: 36px;
    }

    .carousel-button.prev {
        left: 1rem; /* Changed from calc(50% - 45px) to 1rem */
    }

    .carousel-button.next {
        right: 1rem; /* Changed from calc(50% - 45px) to 1rem */
    }

    .carousel-dots {
        position: absolute;
        bottom: 40px;
        left: 0;
        right: 0;
        margin: 0;
    }

    .carousel-slide {
        padding: 0 1rem;
        padding-bottom: 60px; /* Space for navigation */
        height: auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 0;
    }

    .feature-card {
        margin-bottom: 0; /* Remove bottom margin if present */
    }

    .carousel-container {
        margin: 1rem 0;
    }

    .features-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        text-align: start;
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        margin-bottom: 1rem;
    }

    .rotating-words {
        margin-left: 0;
        text-align: center;
    }

    .rotating-words span {
        text-align: center;
        width: 100%;
        left: 50%;
        transform: translateX(-50%);
    }

    @keyframes rotateWords {
        0% { opacity: 0; transform: translate(-50%, 25px); }
        2% { opacity: 1; transform: translate(-50%, 0); }
        23% { opacity: 1; transform: translate(-50%, 0); }
        25% { opacity: 0; transform: translate(-50%, -25px); }
        100% { opacity: 0; transform: translate(-50%, -25px); }
    }
}

/* Video Modal Styles */
.video-modal {
    max-width: 90vw;
    max-height: 90vh;
    padding: 20px;
    position: relative;
}

.video-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.video-modal .modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.video-modal .modal-close i {
    color: white;
    font-size: 18px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-modal {
        max-width: 95vw;
        max-height: 95vh;
        padding: 15px;
    }
    
    .video-modal .modal-close {
        top: 5px;
        right: 5px;
        width: 35px;
        height: 35px;
    }
    
    .video-container {
        padding-bottom: 75%; /* Adjust for mobile */
    }
}