/* Rosé Pine Moon Theme Variables */
:root {
    /* Rosé Pine Moon color palette */
    --rose-pine-base: #232136;
    --rose-pine-surface: #2a273f;
    --rose-pine-overlay: #393552;
    --rose-pine-muted: #6e6a86;
    --rose-pine-subtle: #908caa;
    --rose-pine-text: #e0def4;
    --rose-pine-love: #eb6f92;
    --rose-pine-gold: #f6c177;
    --rose-pine-rose: #ea9a97;
    --rose-pine-pine: #3e8fb0;
    --rose-pine-foam: #9ccfd8;
    --rose-pine-iris: #c4a7e7;
    --rose-pine-highlight-low: #2a283e;
    --rose-pine-highlight-med: #44415a;
    --rose-pine-highlight-high: #56526e;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    background-color: var(--rose-pine-base);
    color: var(--rose-pine-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container Layout */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    gap: 2.5rem;
}

/* Hero Section */
.hero {
    text-align: center;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    /* Fallback for browsers that don't support clamp() */
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 1rem;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Support for clamp() function */
@supports (font-size: clamp(3rem, 8vw, 6rem)) {
    .hero-title {
        font-size: clamp(3rem, 8vw, 6rem);
    }
}

.skull {
    font-size: 1em;
    filter: drop-shadow(0 0 20px var(--rose-pine-love));
}

.function-name {
    color: var(--rose-pine-text);
    text-shadow: 0 0 30px var(--rose-pine-iris);
}

.hero-tagline {
    color: var(--rose-pine-subtle);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-style: italic;
    margin-top: 1rem;
    text-align: center;
}

/* Terminal Section */
.terminal-section {
    width: 100%;
    max-width: 850px;
}

.terminal {
    background-color: var(--rose-pine-surface);
    border: 1px solid var(--rose-pine-overlay);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    background-color: var(--rose-pine-overlay);
    padding: 0.75rem;
    display: flex;
    align-items: center;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close {
    background-color: var(--rose-pine-love);
}

.control.minimize {
    background-color: var(--rose-pine-gold);
}

.control.maximize {
    background-color: var(--rose-pine-foam);
}

.terminal-body {
    padding: 1.5rem;
    background-color: var(--rose-pine-surface);
    height: 180px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Custom scrollbar styling - Cross-browser support */
/* Webkit browsers (Chrome, Safari, Edge) */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: var(--rose-pine-surface);
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--rose-pine-overlay);
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: var(--rose-pine-muted);
}

/* Firefox */
.terminal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--rose-pine-overlay) var(--rose-pine-surface);
}

/* For browsers that support scrollbar-gutter */
@supports (scrollbar-gutter: stable) {
    .terminal-body {
        scrollbar-gutter: stable;
    }
}

.prompt-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-family: inherit;
}

.prompt {
    color: var(--rose-pine-iris);
    font-weight: bold;
}

.command {
    color: var(--rose-pine-gold);
    font-weight: 500;
}

.cursor {
    color: var(--rose-pine-text);
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;
    font-weight: bold;
}

@-webkit-keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Terminal Line Types */
.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.terminal-line.command .prompt {
    color: var(--rose-pine-iris);
    font-weight: bold;
}

.terminal-line.command .text {
    color: var(--rose-pine-gold);
    font-weight: 500;
}

.terminal-line.success .icon {
    color: var(--rose-pine-foam);
    font-weight: bold;
}

.terminal-line.success .text {
    color: var(--rose-pine-text);
}

.terminal-line.info .icon {
    color: var(--rose-pine-iris);
    font-weight: bold;
}

.terminal-line.info .text {
    color: var(--rose-pine-subtle);
}

.terminal-line.error .icon {
    color: var(--rose-pine-love);
    font-weight: bold;
}

.terminal-line.error .text {
    color: var(--rose-pine-text);
}

.terminal-line .cursor {
    color: var(--rose-pine-text);
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;
    font-weight: bold;
}

/* Actions Section */
.actions {
    width: 100%;
    max-width: 800px;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background-color: var(--rose-pine-surface);
    color: var(--rose-pine-text);
    text-decoration: none;
    border: 2px solid var(--rose-pine-overlay);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: -webkit-linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    -webkit-transition: left 0.6s ease;
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.action-btn.obtain:hover {
    border-color: var(--rose-pine-love);
    background-color: var(--rose-pine-highlight-low);
}

.action-btn.pricing:hover {
    border-color: var(--rose-pine-gold);
    background-color: var(--rose-pine-highlight-low);
}

.action-btn.community:hover {
    border-color: var(--rose-pine-foam);
    background-color: var(--rose-pine-highlight-low);
}

.action-btn.documentation:hover {
    border-color: var(--rose-pine-iris);
    background-color: var(--rose-pine-highlight-low);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-btn:focus {
    outline: 2px solid var(--rose-pine-iris);
    outline-offset: 3px;
}

.btn-icon {
    font-size: 1.2em;
}

.btn-text {
    font-family: inherit;
}

/* Dividers */
.divider {
    width: 60%;
    height: 1px;
    background: -webkit-linear-gradient(90deg, transparent, var(--rose-pine-overlay), transparent);
    background: linear-gradient(90deg, transparent, var(--rose-pine-overlay), transparent);
    margin: 1.25rem auto;
}

/* Footer */
.footer {
    text-align: center;
    width: 100%;
    max-width: 1200px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.column-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rose-pine-muted);
    margin-bottom: 0.25rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    color: var(--rose-pine-subtle);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--rose-pine-iris);
}

.footer-link:focus {
    outline: 2px solid var(--rose-pine-iris);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--rose-pine-subtle);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--rose-pine-text);
}

.footer-divider {
    color: var(--rose-pine-muted);
    font-size: 0.9rem;
    user-select: none;
}

.copyright {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--rose-pine-muted);
    font-size: 0.85rem;
}

.copyright a {
    color: var(--rose-pine-subtle);
    text-decoration: none;
    transition: color 0.2s ease;
}

.copyright a:hover {
    color: var(--rose-pine-iris);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        gap: 2rem;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem);
        flex-direction: column;
        gap: 0.5rem;
    }

    .terminal-body {
        padding: 1rem;
        height: 160px;
        overflow-y: auto;
        scroll-behavior: smooth;
    }

    .prompt-line {
        font-size: 1rem;
    }

    .terminal-line {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .button-group {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .action-btn {
        width: 100%;
        max-width: 280px;
    }

    .divider {
        width: 80%;
        margin: 1rem auto;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 280px;
    }

    .footer-column {
        text-align: center;
    }

    .footer-link {
        justify-content: center;
    }

    .footer-links {
        gap: 0.75rem;
    }

    .footer-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        gap: 1.75rem;
    }

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

    .action-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .terminal-body {
        height: 150px;
        overflow-y: auto;
        scroll-behavior: smooth;
    }

    .divider {
        margin: 1rem auto;
    }

    .footer-columns {
        gap: 1.5rem;
    }

    .footer-link {
        font-size: 0.8rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .action-btn {
        border-width: 3px;
    }

    .terminal {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
    }

    .action-btn {
        transition: none;
    }

    .action-btn::before {
        display: none;
    }

    .footer-link {
        transition: none;
    }

    .terminal-line .cursor {
        animation: none;
    }

    .terminal-body {
        scroll-behavior: auto;
    }
}

/* Dark mode preference (already dark, but ensuring consistency) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--rose-pine-base);
        color: var(--rose-pine-text);
    }
}