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

:root {
    /* Light theme - warm beige with maximum contrast */
    --bg-color: #fffbf7;      /* very light warm beige */
    --text-color: #000000;     /* pure black for maximum contrast */
    --border-color: #000000;   /* black borders for maximum contrast */
    --input-bg: #f8f4f0;      /* slightly darker beige */
    --input-focus-bg: #f0ebe6; /* focused input bg */
    --button-bg: #f8f4f0;     /* button background */
    --button-hover-bg: #000000; /* black hover */
    --button-hover-text: #fffbf7; /* light text on hover */
    --error-bg: #f8f4f0;      /* error background */
    --shadow-color: #000000;   /* shadow color */
}

[data-theme="dark"] {
    /* Dark theme - dark blue-gray with maximum contrast */
    --bg-color: #0a0e14;      /* very dark blue-gray */
    --text-color: #ffffff;     /* pure white for maximum contrast */
    --border-color: #ffffff;   /* white borders for maximum contrast */
    --input-bg: #1a202c;      /* dark blue */
    --input-focus-bg: #2d3748; /* focused input bg */
    --button-bg: #1a202c;     /* button background */
    --button-hover-bg: #ffffff; /* white hover */
    --button-hover-text: #0a0e14; /* very dark text on hover */
    --error-bg: #1a202c;      /* error background */
    --shadow-color: #ffffff;   /* shadow color */
}

html, body {
    height: 100%;
}

body {
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    color: var(--text-color);
    background: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Top controls for theme toggle */
.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background: var(--button-bg);
    color: var(--text-color);
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--shadow-color);
}

.theme-toggle:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 var(--shadow-color);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 80px 0 60px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 60px;
}

.title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.sword {
    display: inline-block;
    margin-right: 15px;
    font-size: 3.5rem;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: normal;
    margin-bottom: 20px;
    color: var(--text-color);
    opacity: 0.8;
}

.description {
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.6;
}

/* Install section */
.install-section {
    text-align: center;
    margin-bottom: 60px;
}

.install-section h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-color);
}

.install-box {
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 20px;
    margin: 0 auto;
    max-width: 700px;
    position: relative;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 10px;
}

.install-command {
    font-size: 0.9rem;
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: left;
    white-space: pre-wrap;
}

.copy-btn {
    background-color: var(--button-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 var(--shadow-color);
}

.copy-btn.copied {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
}

/* Features section */
.features {
    margin-bottom: 60px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature {
    text-align: center;
    padding: 30px 15px;
    border: 2px solid var(--border-color);
    background: var(--button-bg);
    transition: all 0.2s ease;
}

.feature:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.feature h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-color);
}

.feature p {
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* Quick example section */
.quick-example {
    text-align: center;
    margin-bottom: 60px;
}

.quick-example h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-color);
}

.code-block {
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 20px;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    overflow-x: auto;
}

.prompt {
    opacity: 0.6;
}

.command {
    color: var(--text-color);
    font-weight: 600;
}

/* CTA section */
.cta-section {
    text-align: center;
    margin-bottom: 60px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    background: var(--button-bg);
    color: var(--text-color);
}

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

.btn-primary:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.btn-secondary {
    background-color: var(--button-bg);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

/* Footer */
.footer {
    border-top: 2px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
}

.footer p {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.footer a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    font-weight: 600;
}

.footer a:hover {
    text-decoration-thickness: 2px;
}

.links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.links a {
    color: var(--text-color);
    opacity: 0.6;
    font-weight: 400;
    font-size: 0.85rem;
    text-decoration: none;
}

.links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 1000px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .sword {
        font-size: 2.5rem;
        margin-right: 10px;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    .install-section h2,
    .quick-example h2 {
        font-size: 1.3rem;
    }
    
    .install-box {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .install-command {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .code-block {
        padding: 15px;
        font-size: 0.75rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature {
        padding: 20px 15px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .btn {
        width: 200px;
    }
    
    .links {
        gap: 15px;
    }
    
    .top-controls {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .sword {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .description {
        font-size: 0.85rem;
    }
    
    .install-section h2,
    .quick-example h2 {
        font-size: 1.2rem;
    }
    
    .install-command {
        font-size: 0.7rem;
    }
    
    .code-block {
        font-size: 0.7rem;
        padding: 12px;
    }
    
    .feature h3 {
        font-size: 0.9rem;
    }
    
    .feature p {
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    
    .theme-toggle {
        display: none;
    }
    
    .top-controls {
        display: none;
    }
}