:root {
    --primary-red: #C83821;
    --card-yellow: #FFF9E5;
    --card-pink: #FFE5E5;
    --card-peach: #FFE5D9;
}

/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
body {
    background-color: white;
    min-height: 100vh;
}

.container {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
}

.logo-container {
    width: 100%;
}

.question-text-desktop,
.question-text-mobile {
    text-align: center;
    font-style: italic;
    color: #333;
    margin: 1rem 0;
    font-weight: 500;
}

.cards-container-mobile,
.cards-container-desktop {
    display: grid;
    gap: 1rem;
    max-width: 1000px;
}

.card {
    background-color: var(--card-peach);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    opacity: 0.9;
}

.card:nth-child(2) {
    background-color: var(--card-yellow);
}

.card:nth-child(3) {
    background-color: var(--card-pink);
}

.card-title {
    color: var(--primary-red);
    font-weight: 800;
    font-size: .9rem;
}

.cards-container-mobile a,
.cards-container-desktop a {
    text-decoration: none;
}

/* Chat Styles */
.chat-container {
    width: 100%;
    margin: 0 auto;
}

.chat-content {
    width: 100%;
}

.chat-input-container {
    display: flex;
    align-items: center;
    margin: 0 auto;
    position: relative;
}

.chat-input-box {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
}

.mobile-chat-button {
    background-color: #C83821;
    color: white;
    padding: 4px 20px;
    font-style: italic;
    border-radius: 50px;
    font-size: 1.5rem;
    text-decoration: none;
}

/* Chat Message Styles */
.chat-message-user,
.chat-message-bot {
    margin: 10px;
    padding: 8px;   
    border: 2px solid #eee;
    color: black;
    border-radius: 3px;
}

.chat-message-user {
    background-color: #dcf8c6;
}

.chat-message-bot {
    background-color: #ececec;
}

/* Source Styles */
.sources-button {
    background-color: #888;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin-left: 10px;
    text-align: left;
    border: 1px solid #000;
    border-radius: 8px;
}

.sources-container {
    padding: 10px;
    margin: 8px;
    background-color: #ececec;
    border-radius: 3px;
}

/* Desktop Specific Styles */
@media (min-width: 769px) {
    .header {
        flex-direction: column;
        padding: min(4vw, 1rem) 0;
        min-height: 30vh;
    }

    .container {
        padding: min(4vw, 2rem);
        padding-bottom: max(15vh, 200px);
        max-width: 100vw;
    }

    .logo-container {
        display: flex;
        justify-content: center;
        height: auto;
        width: min(90%, 800px);
        margin: 0 auto;
    }

    .doge-avatar {
        width: min(90%, 450px);
        height: auto;
    }

    .logo {
        display: none;
    }

    .question-text-desktop {
        font-size: 1.50rem;
    }

    .question-text-mobile {
        display: none;
    }

    .doge-character {
        display: none;
    }

    .chat-container {
        width: min(90%, 800px);
        padding: 0 min(6vw, 6rem);
        margin: 0 auto;
    }

    .chat-content {
        border-style: solid;
        border-color: #eee;
        border-radius: 2px;
        margin-top: 20px;
        padding: 5px;
        border-width: 1px;
    }

    .mobile-chat {
        padding: 0;
        border: none;
        box-shadow: none;
        margin: 0;
        background: none;
        border-radius: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        align-self: center;
        width: 100%;
    }

    .chat-input-container {
        width: min(90%, 800px);
        padding: 0 min(6vw, 6rem);
        align-self: center;
        border: none;
        outline: none;
        box-shadow: none;
    }

    .chat-input-box {
        padding: clamp(0.5rem, 1vw, 1rem) clamp(1rem, 2vw, 2rem);
        background: white;
        border: 3px solid darkgray;
        border-radius: 2px;
        width: 100%;
    }

    .mobile-chat-button {
        font-size: clamp(1.2rem, 2vw, 1.5rem);
        padding: clamp(4px, 1vw, 8px) clamp(15px, 2vw, 25px);
        margin-left: 1.5rem;
    }

    .cards-container-desktop {
        width: min(90%, 800px);
        grid-template-columns: repeat(3, 1fr);
        padding: 0 min(4vw, 2rem);
        gap: clamp(1rem, 2vw, 2rem);
        margin-bottom: 0;
    }
    .cards-container-mobile {
        display: none;
    }

    .card {
        padding: clamp(1rem, 2vw, 1.5rem);
        min-height: clamp(100px, 15vh, 150px);
        text-align: center;
    }

    .card-icon {
        width: clamp(50px, 8vw, 75px);
        height: auto;
        max-width: 75px;
    }

    .footer {
        padding-top: min(4vh, 30px);
        padding-bottom: min(4vh, 30px);
        background-color: #C83821;
        color: white;
        text-align: center;
        margin-top: 2rem;
        position: absolute;
        margin: 0 auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    .footer a {
        color: white;
    }

    .footer a:hover {
        color: cyan;
    }

    .footer p {
        margin: 1rem 0;
    }

    .hamburger-menu {
        position: fixed;
        left: auto;
        right: calc(50% + 400px);
        bottom: 15px;
        transform: none;
        z-index: 100;
    }

    .chat-input-container {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        padding-bottom: 120px;
    }

    .header {
        text-align: center;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo-container img.doge-avatar {
        display: none;
    }

    .logo-container .logo {
        height: 70px;
    }

    .question-text-desktop {
        display: none;
    }

    .question-text-mobile {
        font-size: 1.2rem;
    }

    .doge-character {
        display: block;
        width: 100px;
        height: 100px;
    }

    .chat-container {
        margin: 1rem;
        max-height: 70vh;
        width: calc(100% - 2rem);
    }

    .chat-content {
        max-height: 60vh;
    }

    .cards-container-mobile {
        grid-template-columns: 1fr;
        max-width: 500px;
        position: relative;
        z-index: 2;
    }

    .cards-container-desktop {
        display: none;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .chat-input-container {
        flex: 1;
        gap: 1rem;
        max-width: 1200px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        padding: 0.5rem;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        background-color: white;
    }

    .mobile-chat-button {
        margin-left: .25rem;
    }

    .footer {
        display: none;
    }

    .sidebar {
        width: 250px;
        height: 100%;
        top: 0;
        right: -250px;
        bottom: auto;
    }

    .sidebar.open {
        right: 0;
    }

    .hamburger-menu {
        position: absolute;
        left: 1rem;
        transform: none;
        margin: 0;
    }

    .logo-container {
        margin: 0 auto;
    }
}

/* Base header and hamburger styles */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
}

.hamburger-menu {
    cursor: pointer;
    font-size: 24px;
    position: absolute;
    left: 1rem;
    transform: none;
    margin: 0;
    z-index: 100;
}

.logo-container {
    margin: 0 auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background-color: #f4f4f4;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    transition: right 0.3s ease;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar.open {
    right: 0;
}

.sidebar label {
    margin-right: 15px;
    white-space: nowrap;
}

.context-button {
    margin-top: 10px;
    background-color: #C83821;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
}