/* Base Styles */
:root {
    --bg-color: rgba(255, 255, 255, 0.95);
    --text-color: #2d3436;
    --accent-color: #00b894;
    --prompt-color: #e17055;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'IBM Plex Mono', monospace;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

/* Terminal Styles */
.terminal {
    display: none; /* Initially hidden, shown by JavaScript */
}

.terminal.visible {
    display: block;
}

.terminal {
    width: 100%;
    max-width: 900px;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 1;
}

.terminal:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Theme Variables */
:root {
    /* Light Theme (default) */
    --bg-color: rgba(255, 255, 255, 0.95);
    --text-color: #2d3436;
    --accent-color: #00b894;
    --prompt-color: #e17055;
    --border-color: rgba(0, 0, 0, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-border: rgba(0, 0, 0, 0.1);
    --content-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: rgba(245, 245, 245, 0.9);
    --product-bg: rgba(255, 255, 255, 0.9);
    --product-hover: rgba(0, 0, 0, 0.05);
    --accordion-bg: rgba(248, 249, 250, 0.9);
    --accordion-header: rgba(241, 243, 245, 0.9);
    --accordion-hover: rgba(233, 236, 239, 0.9);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-color: rgba(30, 30, 46, 0.95);
    --text-color: #ffffff;
    --accent-color: #9c27b0; /* Purple accent color */
    --prompt-color: #e67e22;
    --border-color: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --header-bg: rgba(30, 30, 46, 0.9);
    --header-border: rgba(255, 255, 255, 0.1);
    --content-bg: rgba(30, 30, 46, 0.9);
    --footer-bg: rgba(26, 26, 46, 0.9);
    --product-bg: rgba(45, 52, 54, 0.9);
    --product-hover: rgba(255, 255, 255, 0.1);
    --accordion-bg: rgba(45, 52, 54, 0.9);
    --accordion-header: rgba(61, 69, 72, 0.9);
    --accordion-hover: rgba(77, 86, 89, 0.9);
    color-scheme: dark;
}

/* Header */
.header {
    padding: 12px 20px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: relative;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.title {
    flex-grow: 1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
    opacity: 0.8;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
    position: absolute;
    right: 15px;
}

.theme-toggle:hover {
    opacity: 1;
    background: var(--border-color);
}

.theme-toggle i {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .fa-sun {
    position: absolute;
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0);
}

/* Content */
.content {
    padding: 20px;
    min-height: 400px;
    background: var(--content-bg);
    border-radius: 0 0 12px 12px;
    transition: background-color 0.3s ease;
}

.line {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--prompt-color);
    margin-right: 8px;
    font-weight: 600;
}

.output {
    margin-bottom: 24px;
}

/* ASCII Art */
.ascii-art {
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.2;
    margin: 10px 0;
    white-space: pre;
    overflow-x: auto;
}

/* Legal Content */
.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-links li {
    margin-bottom: 5px;
}

.legal-dropdown {
    margin: 5px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.legal-dropdown summary {
    padding: 10px 15px;
    background: #f5f5f5;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95em;
    outline: none;
    transition: background 0.2s;
}

.legal-dropdown summary:hover {
    background: #eaeaea;
}

.legal-dropdown summary::-webkit-details-marker {
    color: var(--accent-color);
}

.legal-content {
    padding: 15px;
    background: #fefefe;
    border-top: 1px solid var(--border-color);
}

.legal-content h3 {
    color: var(--text-color);
    margin: 0 0 10px 0;
    font-size: 1.2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.legal-content h4 {
    color: var(--text-color);
    margin: 15px 0 5px 0;
    font-size: 1em;
}

.legal-content p {
    margin: 5px 0 10px 15px;
    line-height: 1.5;
    font-size: 0.95em;
}

.legal-content ul {
    margin: 5px 0 10px 30px;
    padding: 0;
}

.legal-content li {
    margin-bottom: 5px;
    font-size: 0.95em;
}

/* Animation for dropdown */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-dropdown[open] .legal-content {
    animation: fadeIn 0.2s ease-out;
}

/* Remove default arrow in Firefox */
.legal-dropdown > summary {
    list-style: none;
}

.legal-dropdown > summary::-webkit-details-marker {
    display: none;
}

/* Custom arrow */
.legal-dropdown summary::after {
    content: '▶';
    color: var(--accent-color);
    float: right;
    font-size: 0.8em;
    transition: transform 0.2s;
}

.legal-dropdown[open] > summary::after {
    transform: rotate(90deg);
}

/* File Content */
.file-content {
    font-family: 'IBM Plex Mono', monospace;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 5px 0;
    color: #333;
    overflow-x: auto;
}

.file-content::selection {
    background: var(--accent-color);
    color: white;
}

.link {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color);
}

.link:hover {
    border-bottom-style: solid;
}

/* Accordion Styles */
.accordion {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--accordion-bg);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 600;
    background: var(--accordion-header);
    border: none;
    width: 100%;
    text-align: left;
    font-family: 'IBM Plex Mono', monospace;
    transition: background 0.2s ease, color 0.2s ease;
    color: var(--text-color);
}

.accordion-header:hover {
    background: var(--accordion-hover);
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    margin-left: 10px;
    color: var(--text-color);
    font-weight: bold;
}

.accordion[open] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion[open] .accordion-content {
    padding: 15px;
    max-height: 2000px; /* Adjust based on your content */
    transition: max-height 0.5s ease-in, padding 0.3s ease;
}

.accordion-content h3,
.accordion-content h4 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.accordion-content p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.accordion-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.accordion-content li {
    margin-bottom: 5px;
}

/* Social Links */
.social-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
}

.social-links p {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--text-color);
    opacity: 0.7;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.2em;
}

.social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.social-icon:nth-child(1):hover { color: #E1306C; } /* Instagram */
.social-icon:nth-child(2):hover { color: #1DA1F2; } /* Twitter */
.social-icon:nth-child(3):hover { color: #DA552F; } /* Product Hunt */
.social-icon:nth-child(4):hover { color: #5865F2; } /* Discord */

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.cta-button i {
    font-size: 1.1em;
}

/* Buttons */
.cta-button {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.cta-button:hover {
    background: #333333;
    border-color: #333333;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* For dark mode */
[data-theme="dark"] .cta-button {
    background: #000000;
    border-color: #ffffff;
    color: #ffffff;
}

[data-theme="dark"] .cta-button:hover {
    background: #333333;
    border-color: #ffffff;
}

/* Social Links */
.social-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.social-links p {
    margin-bottom: 10px;
    color: var(--text-muted, #666);
    font-size: 0.9em;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    color: var(--text-color);
    font-size: 1.2em;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.social-icon:hover {
    color: #000000;
    opacity: 1;
    transform: translateY(-2px);
}

[data-theme="dark"] .social-icon:hover {
    color: #ffffff;
}

/* Coming Soon Styles */
.coming-soon {
    color: #e67e22;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 8px;
    background: rgba(230, 126, 34, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.coming-soon-badge {
    display: inline-block;
    background: #e67e22;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 10px;
    cursor: not-allowed;
    opacity: 0.8;
}

.coming-soon-badge:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Terminal Loader */
#terminal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-family: 'IBM Plex Mono', monospace;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-content {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    color: var(--text-color);
}

.loader-line {
    margin: 15px 0;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s forwards;
}

.loader-line:nth-child(1) { animation-delay: 0.3s; }
.loader-line:nth-child(2) { animation-delay: 0.8s; }
.loader-line:nth-child(3) { animation-delay: 1.3s; }
.loader-line:nth-child(4) { 
    animation-delay: 2s; 
    color: var(--accent-color);
    font-weight: 600;
}

.loader-line .prompt {
    color: var(--prompt-color);
    margin-right: 10px;
}

.loader-line .success {
    color: #2ecc71;
    margin-left: 10px;
    display: inline-block;
    animation: bounce 0.5s ease-in-out;
    animation-delay: inherit;
    opacity: 0;
    animation-fill-mode: forwards;
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Product Styles */
.products {
    list-style: none;
    padding-left: 0;
}

.products li {
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.product-link {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    background: var(--product-bg);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s, color 0.2s;
}

.product-link:hover {
    background: var(--product-hover);
    color: var(--text-color);
}

.dir {
    margin-right: 8px;
}

.product-details {
    padding: 15px;
}

.product-desc {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.95em;
    font-weight: 500;
}

.product-features {
    margin-top: 15px;
    padding-left: 5px;
}

.product-features h4 {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: var(--text-color);
}

.product-features ul {
    list-style: none;
    margin: 15px 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-features li {
    margin: 0;
    padding: 10px 15px;
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
    line-height: 1.6;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
}

.product-features li:before {
    content: '→';
    color: var(--accent-color);
    margin-right: 10px;
    position: absolute;
    left: 10px;
    font-weight: bold;
}

[data-theme="dark"] .product-features li {
    background-color: rgba(255, 255, 255, 0.05);
}

.product-features li:hover {
    transform: translateX(5px);
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .product-features li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cta-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #7534f6; /* Purple color */
    color: white !important; /* Ensure text stays white */
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
}

/* Ensure all text in dark mode is white */
[data-theme="dark"] {
    color: #ffffff;
}

[data-theme="dark"] .product-desc,
[data-theme="dark"] .product-features,
[data-theme="dark"] .product-features li,
[data-theme="dark"] .product-features p,
[data-theme="dark"] .product-features h4 {
    color: #ffffff !important;
}

[data-theme="dark"] .product-link {
    color: #ffffff !important;
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 16px;
    background: var(--text-color);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    background: var(--footer-bg);
    padding: 6px 16px;
    font-size: 0.75rem;
    color: var(--text-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social-icon {
    color: #666;
    opacity: 0.7;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.footer-social-icon:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.footer-social-icon:nth-child(1):hover { color: #E1306C; } /* Instagram */
.footer-social-icon:nth-child(2):hover { color: #1DA1F2; } /* Twitter */
.footer-social-icon:nth-child(3):hover { color: #DA552F; } /* Product Hunt */

.status-bar {
    display: flex;
    gap: 16px;
    color: var(--text-color);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        margin: 10px;
    }
    
    .ascii-art {
        font-size: 0.7rem;
    }
}

/* No JavaScript message */
.no-js-message {
    display: none;
    padding: 10px;
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
}
