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

:root {
    /* Color Palette */
    --yellow: #F4D35E;
    --dark-teal: #2e2e2e;
    --dark-button: #0000007a;
    --coral: #EE6C4D;
    --cyan: #00BCD4;
    --cream: #f0f2f0;
    --nav-glass: #ffffffad;
    --menu-glass: #ffffff50;
    --label-gray: #969696;
    
    /* Link colors */
    --link-color: #2e2e2e;
    --link-hover: #EE6C4D;
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

body {
    font-family: var(--font-main);
    background: var(--cream);
    color: var(--dark-teal);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 100px;
    position: relative;
    transition: background-color 0.5s ease;
}

/* Background scribble overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('youtube-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.container,
.top-bar {
    position: relative;
    z-index: 1;
}


/* ============================================
   TOP NAVIGATION BAR
   ============================================ */

.top-bar {
    background: var(--nav-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 5px solid var(--dark-teal);
    border-radius: 20px;
    padding: 1rem 2rem;
    margin: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    box-shadow: 8px 8px 0px #00000050;
    z-index: 500;
    position: relative;
}

.logo-section {
    flex-shrink: 0; /* Prevents logo from shrinking */
    flex-grow: 0; /* Prevents logo from growing */
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-logo {
    height: 80px;
    width: auto;
    max-width: 350px;
}
.controls-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--dark-teal);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 34px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    border: 3px solid var(--dark-teal);
    border-radius: 20px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: var(--coral);
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Pill Dropdowns */
.pill-dropdown {
    position: relative;
}

.pill-select {
    appearance: none;
    background: white;
    border: 3px solid var(--dark-teal);
    border-radius: 15px;
    padding: 0.5rem 2.5rem 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    color: var(--dark-teal);
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%232e2e2e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.pill-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pill-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.3);
}

/* Mood Colors */
.mood-select {
    background-color: white;
}

.critters-select {
    background-color: white;
    color: var(--dark-teal);
}

.stuff-select {
    background-color: white;
    color: var(--dark-teal);
}


.version-badge {
    background: white;
    border: 3px solid var(--dark-teal);
    border-radius: 15px;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dark-teal);
}

/* Mobile settings toggle */
.mobile-settings-toggle {
    display: none;
    background: white;
    color: #ffffff9c;
    border: 3px solid var(--dark-teal);
    border-radius: 12px;
    padding: 0.75rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    line-height: 1;
}

.mobile-settings-toggle:hover {
    transform: translateY(-2px);
}

.mobile-settings-toggle svg {
    display: block;
    width: 28px;
    height: 28px;
    stroke: var(--dark-teal);
    stroke-width: 2;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* ============================================
   PROMPT DISPLAY
   ============================================ */

.prompt-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(80vh - 140px);
    gap: 1.5rem;
    padding-bottom: 100px;
}

.prompt-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--label-gray);
    white-space: nowrap;
    z-index: 10;
}

.prompt-card {
    background: white;
    border: 5px solid var(--dark-teal);
    border-radius: 20px;
    padding: 2rem 3rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Spreads label, prompt, and button evenly */
    position: relative;
    box-shadow: 12px 12px 0px #00000050;
    margin: 0 auto;
    max-width: 1000px;
    width: 100%;
    transition: transform 0.3s ease;
}

.prompt-content {
    /* Remove display: flex - it breaks inline text flow */
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-teal);
    text-align: center;
    width: 100%;
    padding: 3rem 1rem; /* Vertical padding creates the centered feeling */
}

.prompt-content .clickable-word {
    color: var(--link-color);
    cursor: pointer;
    transition: color 0.2s;
    text-transform: capitalize;
}

.prompt-content .clickable-word:hover {
    color: var(--link-hover);
}

.loader {
    font-size: 1.2rem;
    color: var(--dark-teal);
    opacity: 0.6;
}

.hashtag-link {
    display: inline-block;
    align-self: center;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: #2e2e2e;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.hashtag-link:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #2e2e2e;
    text-decoration: none;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.action-buttons {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.icon-btn {
    background: var(--dark-button);
    border: 4px solid var(--dark-teal);
    border-radius: 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0px #00000050;
}

.icon-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #00000050;
}

.icon-btn:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px #00000050;
}

.icon-btn .material-symbols-outlined {
    font-size: 28px;
    color: white;
}

/* Random Button */
.random-button {
    background: var(--dark-button);
    color: white;
    border: 4px solid var(--dark-teal);
    border-radius: 15px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 6px 6px 0px #00000050;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    max-width: 300px;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.random-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 6px 8px 0px #00000050;
}

.random-button:active {
    transform: translateX(-50%) translateY(0);
    box-shadow: 6px 4px 0px #00000050;
}

.random-button .material-symbols-outlined {
    font-size: 32px;
}

@keyframes gentle-bounce {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    20% {
        transform: translateX(-50%) translateY(-8px);
    }
    40% {
        transform: translateX(-50%) translateY(0);
    }
    55% {
        transform: translateX(-50%) translateY(-4px);
    }
    70% {
        transform: translateX(-50%) translateY(0);
    }
    100% {
        transform: translateX(-50%) translateY(0);
    }
}

.random-button.bounce {
    animation: gentle-bounce 0.8s ease-out;
}


/* ============================================
   ARCHIVE
   ============================================ */

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.archive-header h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin: 0;
}

.archive-nav {
    display: flex;
    gap: 0.5rem;
}

.archive-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border: 3px solid var(--dark-teal);
    border-radius: 12px;
}

.archive-page-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark-teal);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.archive-page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.archive-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#archivePageInfo {
    font-weight: 700;
    color: var(--dark-teal);
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.archive-item {
    background: #2563EB; /* Default, will be overridden by inline style */
    border: 5px solid var(--dark-teal);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.3);
    text-decoration: none;
    display: block;
    color: white;
}

.archive-item:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px rgba(0,0,0,0.3);
}

.archive-date {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.archive-prompt {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: white;
}

.archive-hashtag {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .archive-page-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    body {
        padding-bottom: 140px;
    }
    
    .top-bar {
        border-radius: 15px;
        padding: 1rem;
        gap: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    .logo-section {
        display: flex;
        align-items: center;
    }

    
    .site-title {
        font-size: 1.2rem;
    }
    
    /* Hide controls and version on mobile/tablet */
    .controls-section {
        display: none;
        position: fixed;
        top: 6.5rem;
        right: 1.5rem;
        background: #ededed;
        border: 5px solid var(--dark-teal);
        border-radius: 15px;
        padding: 1.5rem;
        width: 320px;
        flex-direction: column;
        gap: 1.25rem;
        box-shadow: 8px 8px 0px #00000050;
        z-index: 2000;
        align-items: flex-start;
    }
    
    .controls-section.mobile-visible {
        display: flex;
    }
    
    .control-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .control-label {
        font-size: 0.75rem;
    }
    
    .pill-dropdown {
        width: 100%;
    }
    
    .pill-select {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.7rem 2.5rem 0.7rem 1rem;
    }
    
    .mobile-settings-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .version-badge {
        display: none;
    }
    
    .prompt-container {
        min-height: calc(70vh - 100px);
        gap: 1rem;
    }
    
    .prompt-content {
        font-size: 2.5rem;
    }
    
    .prompt-card {
        padding: 4rem 2rem 3rem;
        min-height: 350px;
    }
    
    .prompt-label {
        font-size: 0.75rem;
        top: 1.5rem;
    }
    
    .random-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
        max-width: calc(100% - 3rem);
    }
    
    .random-button .material-symbols-outlined {
        font-size: 28px;
    }
    
    .action-buttons {
        bottom: 1rem;
        left: 1rem;
        flex-direction: column;
    }
    
    .icon-btn {
        width: 50px;
        height: 50px;
    }
    
    .icon-btn .material-symbols-outlined {
        font-size: 24px;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .prompt-content {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .site-logo {
        height: 60px;
    }
}
@media (max-width: 480px) {
    .controls-section {
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    .prompt-content {
        font-size: 2rem;
    }
    
    .prompt-card {
        padding: 3rem 1.5rem 2.5rem;
        min-height: 300px;
    }
    
    .prompt-label {
        font-size: 0.7rem;
        top: 1rem;
    }
}

