:root {
    --bg-color: #ffffff;
    --bg-rgb: 255, 255, 255;
    --text-color: #000000;
    --btn-bg: #000000;
    --btn-text: #ffffff;
    --border-color: #e5e5e5;
    --noise-color: rgba(0, 0, 0, 0.35);
}

html.dark {
    --bg-color: #000000;
    --bg-rgb: 0, 0, 0;
    --text-color: #ffffff;
    --btn-bg: #ffffff;
    --btn-text: #000000;
    --border-color: #333333;
    --noise-color: rgba(255, 255, 255, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* View Transition styling for the overlay effect */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    transition: background-color 0s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 1px 1px, var(--noise-color) 1px, transparent 0);
    background-size: 20px 20px;
}



.toggle-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(var(--text-color), 0.1);
}

.toggle-btn:hover {
    transform: scale(1.05);
}

.toggle-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    margin-top: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

p.subtitle {
    font-size: 1.25rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 3.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: 2px solid var(--btn-bg);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: var(--btn-text);
    color: var(--btn-bg);
    border: 2px solid var(--btn-bg);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-secondary:hover {
    opacity: 0.8;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
}



.install-code {
    margin-top: 4rem;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    text-align: left;
    max-width: 100%;
    overflow-x: auto;
}

.install-code button {
    background: none;
    border: none;
    color: var(--btn-text);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.install-code button:hover {
    opacity: 1;
}

.code-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.code-label {
    opacity: 0.5;
    user-select: none;
}

.install-code svg {
    stroke: currentColor;
    fill: none;
}

footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(var(--bg-rgb), 0.75);
}

footer p {
    margin: 0;
    opacity: 0.7;
}

footer a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.7;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .toggle-btn {
        top: 1rem;
        right: 1rem;
    }

    main {
        padding: 5rem 1rem 3rem 1rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    p.subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .actions {
        gap: 0.75rem;
        flex-direction: column;
        align-items: center;
    }

    .install-code {
        padding: 1rem;
        gap: 1rem;
        font-size: 0.8rem;
        margin-top: 3rem;
        width: 100%;
    }

    .code-text {
        overflow-x: auto;
    }
}