/* styles.css */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Fira+Mono&display=swap');

/* Root Variables */
:root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --card-foreground: #fafafa;
    --popover: #18181b;
    --popover-foreground: #fafafa;
    --primary: #fafafa;
    --primary-foreground: #fafafa;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --accent: #27272a;
    --accent-foreground: #fafafa;
    --destructive: #7f1d1d;
    --destructive-foreground: #fafafa;
    --border: #27272a;
    --input: #27272a;
    --ring: #2affff;
    --radius: 0.5rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Container Style */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Heading Styles */
h1 {
    font-family: 'Fira Mono', monospace;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    border-right: .15em solid var(--primary);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation:
        typing 3s steps(15, end),
        blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 25ch }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary); }
}

/* Description Styles */
.description {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

.description::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    from {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    to {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Structure Styles */
.structure {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

pre {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow-x: auto;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--secondary-foreground);
    white-space: pre-wrap;
}

/* Button Styles */
.download-btn {
    background-color: var(--foreground);
    color: var(--background);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: var(--muted-foreground);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.download-btn:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

::-webkit-scrollbar-thumb {
    background-color: var(--muted-foreground);
    border-radius: 20px;
    border: 2px solid var(--secondary);
}

/* Responsive Styles */
@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .structure {
        padding: 1rem;
    }

    pre {
        font-size: 0.75rem;
    }

    .description {
        font-size: 0.9rem;
    }

    .download-btn {
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 1.75rem;
    }
}
