/* Base styles and variables */
:root {
    --background-color: #040a18;
    --card-bg-color: #0b1428;
    --text-primary: #ffffff;
    --text-secondary: #a0b3d8;
    --accent-color: #3bff89;
    --primary-btn-color: #091e42;
    --secondary-btn-color: #0f2756;
    --border-radius: 10px;
    --sidebar-width: 280px;
    --header-height: 60px;
    --code-blue: #4a78e0;
    --code-red: #e06c75;
    --code-green: #98c379;
    --code-yellow: #e5c07b;
    --code-purple: #c678dd;
    --code-orange: #d19a66;
    --blue-glow: #1254c4;
    --dark-blue: #0a2a66;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
      Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

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

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 0 rgba(59, 255, 137, 0);
    }
    50% {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 255, 137, 0.2);
    }
    100% {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 0 rgba(59, 255, 137, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-35px) rotate(-3deg);
    }
    75% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shootingstar {
    0% {
        width: 0;
        opacity: 0;
    }
    30% {
        width: 100px;
        opacity: 1;
    }
    80% {
        width: 150px;
        opacity: 1;
    }
    100% {
        width: 0;
        opacity: 0;
    }
}

/* Leaves container and leaves styling */
.leaves-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.leaf {
    position: absolute;
    border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
    opacity: 0.15;
    filter: blur(2px);
    animation: float var(--float-duration, 20s) ease-in-out infinite, spin var(--spin-duration, 40s) linear infinite;
}

.leaf.circle {
    border-radius: 50%;
}

.leaf.square {
    border-radius: 10%;
}

.leaf.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.inner-leaf {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
    transform: rotate(45deg);
}

.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(59, 255, 137, 0.5), rgba(255, 255, 255, 0));
    animation: shootingstar 3s ease-in-out;
    z-index: -1;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(-45deg, #000000, #020814, #081022, #0c1e4a);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* Layout styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: rgba(4, 10, 24, 0.9);
    z-index: 100;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    overflow-y: auto;
    border-right: 1px solid rgba(59, 255, 137, 0.1);
    box-shadow: 3px 0 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #222;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-container h1 {
    font-size: 24px;
    font-weight: 500;
}

.close-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background-color: #252525;
    border-radius: 8px;
    color: var(--text-secondary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    margin: 5px 10px;
    border-radius: 10px;
    text-decoration: none;
    overflow: hidden;
}

.nav-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(59, 255, 137, 0), rgba(59, 255, 137, 0.8), rgba(59, 255, 137, 0));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(11, 20, 40, 0.6);
    color: var(--text-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.nav-item:hover:before, .nav-item.active:before {
    transform: scaleY(1);
}

.nav-item.active {
    background-color: rgba(11, 20, 40, 0.8);
    border-left: 2px solid var(--accent-color);
}

.nav-item .fas {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    border-radius: 50%;
    font-size: 10px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease-in-out;
    width: calc(100% - var(--sidebar-width));
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(4, 10, 24, 0.8);
    border-bottom: 1px solid rgba(59, 255, 137, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background-color: #252525;
    border-radius: 8px;
    font-size: 18px;
}

.content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

/* Code editor styles */
.code-editor-showcase {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #222;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #141414;
    border-bottom: 1px solid #222;
}

.tabs {
    display: flex;
    gap: 15px;
}

.tab {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.tab.active {
    color: var(--text-primary);
}

.editor-controls {
    display: flex;
    gap: 10px;
}

.editor-btn {
    color: var(--text-secondary);
    font-size: 12px;
}

.editor-content {
    display: flex;
    height: 250px;
    background-color: #111;
    position: relative;
}

.code-box-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0;
    position: relative;
}

.simplified-script-box {
    background-color: rgba(11, 20, 40, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 rgba(59, 255, 137, 0);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(59, 255, 137, 0.2);
    animation: fadeIn 0.8s ease-out;
}

.simplified-script-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background-color: rgba(11, 20, 40, 0.8);
    border-color: rgba(59, 255, 137, 0.4);
    animation: pulse 1.5s infinite;
}

.script-content {
    font-family: 'Consolas', monospace;
    color: #3bff89;
    font-size: 18px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: auto;
    padding: 10px 0;
}

.click-to-copy-hint {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.simplified-script-box:hover .click-to-copy-hint {
    opacity: 1;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    background-color: #0e0e0e;
    padding: 10px 8px;
    color: #444;
    font-family: monospace;
    font-size: 12px;
    text-align: right;
    user-select: none;
}

.code {
    flex: 1;
    padding: 10px;
    overflow: auto;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-primary);
}

.code pre {
    margin: 0;
}

.code .keyword {
    color: var(--code-purple);
}

.code .variable {
    color: var(--code-red);
}

.code .function {
    color: var(--code-blue);
}

.code .parameter {
    color: var(--code-orange);
}

.code .string {
    color: var(--code-green);
}

.client-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 180px;
    background-color: #0d0d0d;
    border-left: 1px solid #222;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 10px;
    font-size: 12px;
    border-bottom: 1px solid #222;
    font-weight: 500;
}

.client-list {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
}

.client-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.client-item .online {
    color: #4CAF50;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #141414;
    border-top: 1px solid #222;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 15px;
}

.toolbar-btn {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Button styles */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-btn-color);
    color: var(--text-primary);
}

.btn-secondary {
    background-color: var(--secondary-btn-color);
    color: var(--text-secondary);
    border: 1px solid #333;
}

.btn:hover {
    opacity: 0.9;
}

.btn-download {
    font-size: 16px;
}

/* FAQ styles */
.faq-preview {
    margin: 30px 0;
}

.faq-preview h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.faq-item {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
}

.expand-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background-color: #252525;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 12px;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-answer.show {
    padding: 0 20px 15px;
    max-height: 200px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer and tagline */
.tagline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px;
}

.logo-small .logo-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.tagline p {
    color: var(--text-secondary);
    font-size: 16px;
}

.footer {
    border-top: 1px solid rgba(59, 255, 137, 0.1);
    padding-top: 30px;
    margin-top: 60px;
    background: linear-gradient(to top, rgba(4, 10, 24, 0.8), transparent);
    border-radius: 15px 15px 0 0;
    padding-bottom: 20px;
    animation: fadeIn 0.8s ease-out;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    padding: 5px 0;
}

.footer-links a:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, rgba(59, 255, 137, 0), rgba(59, 255, 137, 0.7), rgba(59, 255, 137, 0));
    transform: scaleX(0);
    transform-origin: bottom center;
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

.footer-links a:hover:after {
    transform: scaleX(1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.social-link {
    color: var(--text-secondary);
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(11, 20, 40, 0.7);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 255, 137, 0.1);
}

.social-link:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 255, 137, 0.2) 0%, rgba(59, 255, 137, 0) 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateY(-5px);
    border-color: rgba(59, 255, 137, 0.3);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(59, 255, 137, 0.1);
}

.social-link:hover:before {
    transform: scale(3);
}

.description {
    text-align: center;
    color: var(--text-secondary);
    margin: 15px 0;
}

/* Mobile navigation controls */
.mobile-nav-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.nav-control {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .menu-toggle {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .client-panel {
        display: none;
    }
    
    .editor-content {
        height: 200px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

/* Feature section styles */
.feature-section {
    margin: 40px 0;
}

.feature-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 0 15px rgba(59, 255, 137, 0.3);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background-color: rgba(11, 20, 40, 0.7);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(59, 255, 137, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.feature-item:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 255, 137, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(59, 255, 137, 0.1);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.feature-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .editor-header .tabs {
        gap: 10px;
    }
    
    .tab {
        font-size: 12px;
    }
    
    .editor-content {
        height: 150px;
    }
    
    .footer-links {
        flex-wrap: wrap;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
}
