/* RIG-CODER STYLESHEET - Modern & Vibrant Design */

:root {
    --primary-purple: #8B5CF6;
    --primary-blue: #3B82F6;
    --primary-pink: #EC4899;
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
    --gradient-vibrant: linear-gradient(135deg, #EC4899 0%, #8B5CF6 50%, #3B82F6 100%);
    --dark-bg: #0F172A;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-light: #FFFFFF;
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #FFF;
    overflow-x: hidden;
}

/* Background Cursor */
.cursor-container {
    position: fixed;
    top: 20%;
    right: 10%;
    z-index: 1;
    opacity: 0.05;
    pointer-events: none;
}

.typing-cursor {
    width: 20px;
    height: 80px;
    background: var(--primary-purple);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 50px;
    height: 50px;
    animation: rotate-logo 10s linear infinite;
}

@keyframes rotate-logo {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.cta-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: #FFF;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 8px;
}

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

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.hero-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #FFF;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: #E2E8F0;
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 800px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #FFF;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: #FFF;
    color: var(--primary-purple);
    transform: translateY(-3px);
    border-color: #FFF;
}

.trust-badges {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #E2E8F0;
}

.badge i {
    color: var(--primary-purple);
    font-size: 1.25rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    animation: bounce 2s infinite;
    z-index: 3;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Features */
.features {
    padding: 6rem 2rem;
    background: #FFF;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #FFF;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #FFF;
    transition: 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-list li i {
    color: var(--primary-purple);
}

/* About */
.about {
    padding: 2rem 2rem;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFF;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-feature-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.about-feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.about-feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.animation-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.coding-animation {
    width: 100%;
    height: auto;
}

.editor-bg {
    fill: rgba(139, 92, 246, 0.2);
    stroke: var(--primary-purple);
    stroke-width: 2;
}

.code-line {
    stroke: #06B6D4;
    stroke-width: 4;
    stroke-linecap: round;
    opacity: 0;
    animation: lineAppear 3s ease-in-out infinite;
}

.code-line.line-1 {
    animation-delay: 0s;
}

.code-line.line-2 {
    animation-delay: 0.2s;
}

.code-line.line-3 {
    animation-delay: 0.4s;
}

.code-line.line-4 {
    animation-delay: 0.6s;
}

.code-line.line-5 {
    animation-delay: 0.8s;
}

@keyframes lineAppear {

    0%,
    20% {
        opacity: 0;
    }

    40%,
    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.svg-cursor {
    fill: var(--primary-pink);
    animation: svgBlink 1s infinite;
}

@keyframes svgBlink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* Stats */
.stats {
    padding: 6rem 2rem;
    background: #F8FAFC;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: #FFF;
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Contact */
.contact {
    padding: 6rem 2rem;
    background: #FFF;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #FFF;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: #F8FAFC;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    transition: 0.3s;
    text-decoration: none;
}

.social-link:hover {
    background: var(--gradient-primary);
    color: #FFF;
    transform: translateY(-3px);
}

.contact-form-container {
    background: #F8FAFC;
    padding: 3rem;
    border-radius: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: 0.2s;
    background: #FFF;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
}

.full-width {
    width: 100%;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: #FFF;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #FFF;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-purple);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.8;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #FFF;
    padding: 3rem;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    /* Responsive width */
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    /* Prevent overflow on small height screens */
    overflow-y: auto;
    /* Allow scrolling if content is too tall */
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        /* Reduce padding on mobile */
        border-radius: 16px;
    }

    .modal-header {
        margin-bottom: 1.5rem;
    }

    .modal-icon {
        font-size: 3rem;
        /* Smaller icon */
    }

    .logo-img {
        width: 40px;
        /* Smaller logo in navbar */
        height: 40px;
    }

    .logo-text {
        font-size: 1.25rem;
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--primary-purple);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-icon {
    font-size: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.demo-modal {
    max-width: 700px;
}

.demo-video-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.demo-preview {
    width: 100%;
    height: auto;
    display: block;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #FFF;
    cursor: pointer;
    transition: 0.3s;
}

.play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.demo-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.demo-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.error-modal {
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

.error-icon {
    font-size: 5rem;
    color: #EF4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {

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

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

/* Responsive */
@media (max-width: 1024px) {

    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
        /* Reduce padding on mobile */
    }

    .nav-container {
        padding: 0.5rem 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        /* Approximate accessible height, better to match navbar height */
        left: -100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        height: calc(100vh - 70px);
        /* Full height minus navbar */
        padding: 2rem;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
        transition: 0.3s ease-in-out;
        gap: 1.5rem;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.25rem;
        /* Larger font for touch targets */
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 6rem 2rem 4rem;
    }

    .features,
    .about,
    .stats,
    .contact {
        padding: 4rem 1.5rem;
    }

    .footer {
        padding: 3rem 1.5rem 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 3rem;
        /* Further reduce padding */
    }

    .features,
    .about,
    .stats,
    .contact {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
        /* Reduce section title size */
    }

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

    .contact-content {
        gap: 2rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }
}

/* Active State for Tabs */
.about-feature-item {
    cursor: pointer;
}

.about-feature-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-purple);
    transform: translateX(10px);
    box-shadow: var(--shadow-glow);
}

.about-feature-item.active .about-feature-icon {
    transform: scale(1.1);
}

/* Image Container */
.animation-container {
    padding: 0;
    /* Remove padding to maximize space */
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Increase size */
    aspect-ratio: 1;
    /* Force square aspect ratio */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    /* Center if width is less than container */
    border-radius: 50%;
    /* Make it circular */
    background: #ffffff;
    /* White background */
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Prevent cropping */
    border-radius: 0;
    /* Let container handle shape */
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease;
}

/* Image Drop Animation */
@keyframes imageDrop {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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

.image-animate {
    animation: imageDrop 0.5s ease-out forwards;
}