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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    line-height: 1.8;
    color: #1a1a1a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 100;
    text-align: center;
    padding: 60px 30px 20px;
    border-bottom: 1px solid #e5e5e5;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.header.visible {
    opacity: 1;
    transform: translateY(0);
}

.logo {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #000000;
    line-height: 1.3;
    margin-bottom: 30px;
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    width: 100%;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #2a2a2a;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.sign-out-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #2a2a2a;
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 10;
}

.sign-out-btn:hover {
    color: #000000;
}

.sign-out-btn::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000000;
    transition: width 0.3s ease;
}

.sign-out-btn:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #000000;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000000;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.content {
    position: relative;
    padding: 30px 20px;
    flex: 1;
}

/* Add extra padding for cards page */
body:has(.cards-page-container) .content {
    padding-left: 40px;
    padding-right: 40px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 80px 40px 60px;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: #fafafa;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: #000000;
    line-height: 1.4;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 300;
    color: #2a2a2a;
    line-height: 1.8;
    margin-bottom: 20px;
}

.hero-subtitle:last-of-type {
    margin-bottom: 0;
}

/* This is for you if... Section */
.for-you-section {
    max-width: 700px;
    margin: 80px auto 40px;
    padding: 50px 40px;
    background: #fafafa;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
}

.for-you-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #000000;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.for-you-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.for-you-list li {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #2a2a2a;
    line-height: 1.8;
    padding: 15px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.for-you-list li:last-child {
    border-bottom: none;
}

.for-you-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #000000;
    font-size: 1.5rem;
    line-height: 1.4;
}

/* Feature Sections (Games and Articles) */
.feature-section {
    max-width: 700px;
    margin: 60px auto 40px;
    padding: 50px 40px;
    background: #fafafa;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
}

.feature-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #000000;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.feature-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #2a2a2a;
    line-height: 1.8;
    text-align: center;
}

/* Bright path line */
.path-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, 
        #FF6B6B 0%,
        #FF8C42 20%,
        #FF9F9F 40%,
        #FFB84D 60%,
        #FF825A 80%,
        #FF6B6B 100%
    );
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

/* Content boxes */
.content-box {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 0;
    margin-bottom: 60px;
    max-width: 480px;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px) rotate(0deg);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, box-shadow 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.content-box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slight rotation for visual interest */
.box-left.visible {
    transform: translateY(0) rotate(-1.5deg);
}

.box-right.visible {
    transform: translateY(0) rotate(1.5deg);
}

.content-box:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.box-left:hover {
    transform: translateY(-2px) rotate(-1.5deg) scale(1.01);
}

.box-right:hover {
    transform: translateY(-2px) rotate(1.5deg) scale(1.01);
}

.box-content {
    padding: 35px 40px;
    text-align: center;
}

.box-content p {
    margin: 0;
    line-height: 1.8;
}

/* Zig-zag positioning */
.box-left {
    margin-left: 0;
    margin-right: calc(50% + 30px);
}

.box-right {
    margin-left: calc(50% + 30px);
    margin-right: 0;
}

/* Connection dots on the path line - positioned on center line between card and line */
.content-box::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.content-box:hover::before {
    transform: translateY(-50%) scale(1.15);
}

/* Position dots between the card and the center line */
/* For left boxes: position dot halfway between card's right edge and centerline (15px from card edge) */
.box-left::before {
    right: -15px;
    transform: translateY(-50%);
}

/* For right boxes: position dot halfway between card's left edge and centerline (15px from card edge) */
.box-right::before {
    left: -15px;
    transform: translateY(-50%);
}

.content-box:hover.box-left::before {
    transform: translateY(-50%) scale(1.15);
}

.content-box:hover.box-right::before {
    transform: translateY(-50%) scale(1.15);
}

/* Distinct vibrant colors for each dot */
.box-1::before {
    background: #FF6B6B;
    box-shadow: 0 0 0 2px #FF6B6B, 0 2px 8px rgba(255, 107, 107, 0.4);
}

.box-1:hover::before {
    box-shadow: 0 0 0 2px #FF6B6B, 0 4px 12px rgba(255, 107, 107, 0.6);
}

.box-2::before {
    background: #4ECDC4;
    box-shadow: 0 0 0 2px #4ECDC4, 0 2px 8px rgba(78, 205, 196, 0.4);
}

.box-2:hover::before {
    box-shadow: 0 0 0 2px #4ECDC4, 0 4px 12px rgba(78, 205, 196, 0.6);
}

.box-3::before {
    background: #FFE66D;
    box-shadow: 0 0 0 2px #FFE66D, 0 2px 8px rgba(255, 230, 109, 0.4);
}

.box-3:hover::before {
    box-shadow: 0 0 0 2px #FFE66D, 0 4px 12px rgba(255, 230, 109, 0.6);
}

.box-4::before {
    background: #FF8C42;
    box-shadow: 0 0 0 2px #FF8C42, 0 2px 8px rgba(255, 140, 66, 0.4);
}

.box-4:hover::before {
    box-shadow: 0 0 0 2px #FF8C42, 0 4px 12px rgba(255, 140, 66, 0.6);
}

.box-5::before {
    background: #A8E6CF;
    box-shadow: 0 0 0 2px #A8E6CF, 0 2px 8px rgba(168, 230, 207, 0.4);
}

.box-5:hover::before {
    box-shadow: 0 0 0 2px #A8E6CF, 0 4px 12px rgba(168, 230, 207, 0.6);
}

.box-6::before {
    background: #FF6B9D;
    box-shadow: 0 0 0 2px #FF6B9D, 0 2px 8px rgba(255, 107, 157, 0.4);
}

.box-6:hover::before {
    box-shadow: 0 0 0 2px #FF6B9D, 0 4px 12px rgba(255, 107, 157, 0.6);
}

.box-7::before {
    background: #95E1D3;
    box-shadow: 0 0 0 2px #95E1D3, 0 2px 8px rgba(149, 225, 211, 0.4);
}

.box-7:hover::before {
    box-shadow: 0 0 0 2px #95E1D3, 0 4px 12px rgba(149, 225, 211, 0.6);
}

.box-8::before {
    background: #F38181;
    box-shadow: 0 0 0 2px #F38181, 0 2px 8px rgba(243, 129, 129, 0.4);
}

.box-8:hover::before {
    box-shadow: 0 0 0 2px #F38181, 0 4px 12px rgba(243, 129, 129, 0.6);
}

.box-9::before {
    background: #AA96DA;
    box-shadow: 0 0 0 2px #AA96DA, 0 2px 8px rgba(170, 150, 218, 0.4);
}

.box-9:hover::before {
    box-shadow: 0 0 0 2px #AA96DA, 0 4px 12px rgba(170, 150, 218, 0.6);
}

.box-10::before {
    background: #FCBAD3;
    box-shadow: 0 0 0 2px #FCBAD3, 0 2px 8px rgba(252, 186, 211, 0.4);
}

.box-10:hover::before {
    box-shadow: 0 0 0 2px #FCBAD3, 0 4px 12px rgba(252, 186, 211, 0.6);
}

/* Scroll-triggered fade-in animation is handled by JavaScript */

/* Typography */
.lead {
    font-size: 1.1rem;
    color: #4a4a4a;
    margin-bottom: 15px;
}

.question {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    font-style: italic;
    color: #000000;
    margin: 25px 0;
    font-weight: 400;
    line-height: 1.3;
}

.answer {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    font-style: italic;
    color: #000000;
    margin: 25px 0;
    font-weight: 400;
    line-height: 1.2;
}

.box-content p {
    font-size: 1.05rem;
    color: #2a2a2a;
    line-height: 1.8;
}

.emphasized {
    font-style: italic;
    color: #1a1a1a;
    font-weight: 400;
}

.solution-intro {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: #000000;
    font-weight: 400;
    text-align: center;
}

.app-name {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 15px;
}

.app-tagline {
    font-size: 1.1rem;
    color: #2a2a2a;
    margin-bottom: 25px;
    font-style: italic;
}

.closing-line {
    font-family: 'DM Serif Display', serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 20px;
    font-style: italic;
    text-align: center;
    line-height: 1.2;
}

.closing-tagline {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: #4a4a4a;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-align: center;
}

.footer {
    position: relative;
    background-color: #ffffff;
    z-index: 100;
    text-align: center;
    padding: 60px 30px;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    width: 100%;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Make footer sticky only on cards page */
body:has(.cards-page-container) .footer {
    position: sticky;
    bottom: 0;
}

.footer p {
    font-size: 0.85rem;
    color: #8a8a8a;
    font-weight: 300;
    margin: 0;
}

.footer-sign-out-btn {
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(220, 53, 69, 0.4);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.footer-sign-out-btn:hover {
    border-color: rgba(220, 53, 69, 0.7);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.2);
}

.footer-sign-out-btn:active {
    transform: scale(0.95);
}

.footer-sign-out-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.3);
    transition: background 0.3s ease;
}

.footer-sign-out-btn:hover::before {
    background: rgba(220, 53, 69, 0.5);
}

/* Card Page Styles */
.card-page-container,
.cards-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.card-display {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.card-header {
    margin-bottom: 40px;
}

.card-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 10px;
}

.card-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #8a8a8a;
    font-weight: 300;
}

.prompt-card {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 30px;
}

.prompt-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #000000;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 10px;
}

.parent-notes-inline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin-top: 20px;
}

.parent-notes-inline strong {
    font-weight: 600;
    color: #000000;
}

.prompt-loading {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #8a8a8a;
    font-weight: 300;
}

.card-metadata {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.metadata-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.metadata-label {
    font-weight: 500;
    color: #2a2a2a;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.metadata-help {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.metadata-help:hover {
    opacity: 1;
    color: #666666;
}

.metadata-help svg {
    width: 14px;
    height: 14px;
}

.metadata-value {
    color: #666666;
    font-weight: 300;
}

.parent-notes {
    margin-top: 0;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
    text-align: left;
}

.notes-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 20px;
}

.notes-content {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #2a2a2a;
    line-height: 1.8;
}

/* Auth Page Styles */
.auth-page-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.auth-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 10px;
    text-align: center;
}

.auth-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #4a4a4a;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 300;
}

.message-area {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.message-area.error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.message-area.success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

.message-area.info {
    background-color: #eef;
    border: 1px solid #ccf;
    color: #33c;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #2a2a2a;
    font-weight: 400;
}

.form-input {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #000000;
}

.form-hint {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #8a8a8a;
    font-weight: 300;
}

.forgot-password {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #2a2a2a;
    text-decoration: none;
    align-self: flex-end;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #000000;
}

#successMessage,
#errorMessage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.auth-button {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 14px 24px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.auth-button:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-footer {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #4a4a4a;
    text-align: center;
    margin-top: 30px;
    font-weight: 300;
}

.pricing-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.pricing-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #2a2a2a;
    margin: 0;
    font-weight: 400;
}

.loading-message {
    text-align: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    color: #666666;
}

.success-text {
    text-align: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    color: #2a2a2a;
    font-size: 1rem;
    margin-bottom: 20px;
}

.error-text {
    text-align: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    color: #d32f2f;
    font-size: 1rem;
    margin-bottom: 20px;
}

.auth-link {
    color: #000000;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #2a2a2a;
}

/* Carousel Section */
.carousel-section {
    margin-bottom: 40px;
    padding: 40px 0;
}

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    perspective: 1200px;
    height: 600px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
    backface-visibility: hidden;
    overflow-y: auto;
    overflow-x: hidden;
    /* Default state - will be overridden by active/prev/next classes */
    opacity: 0;
    transform: translateZ(-200px) scale(0.85);
    z-index: 1;
}

.carousel-card.active {
    transform: translateZ(0) scale(1);
    opacity: 1;
    z-index: 3;
}

.carousel-card.prev {
    transform: translateX(-80%) translateZ(-200px) scale(0.85);
    opacity: 0.6;
    z-index: 2;
}

.carousel-card.next {
    transform: translateX(80%) translateZ(-200px) scale(0.85);
    opacity: 0.6;
    z-index: 2;
}

.card-content {
    padding: 40px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #000000;
}

.carousel-nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav-left {
    left: -24px;
}

.carousel-nav-right {
    right: -24px;
}

/* Mobile adjustments for carousel */
@media (max-width: 768px) {
    body:has(.cards-page-container) .content {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 2px;
    }
    
    .carousel-section {
        margin-bottom: 15px;
        padding: 5px 0;
    }
    
    .carousel-container {
        height: 500px;
        padding: 0 20px;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav-left {
        left: 10px;
    }
    
    .carousel-nav-right {
        right: 10px;
    }
    
    .carousel-card.prev {
        transform: translateX(-70%) translateZ(-150px) scale(0.8);
    }
    
    .carousel-card.next {
        transform: translateX(70%) translateZ(-150px) scale(0.8);
    }
    
    .card-content {
        padding: 30px 20px;
    }
    
    /* Metadata box adjustments for mobile */
    .random-prompt-metadata,
    .prompt-metadata-container {
        padding: 12px;
        margin-top: 20px;
    }
    
    .metadata-content,
    .prompt-metadata-content {
        gap: 8px;
    }
    
    .metadata-item {
        font-size: 0.75rem;
        gap: 6px;
    }
    
    .metadata-label {
        font-size: 0.75rem;
        min-width: 70px;
    }
    
    .metadata-value {
        font-size: 0.75rem;
    }
    
    .metadata-help {
        width: 12px;
        height: 12px;
    }
    
    .metadata-help svg {
        width: 10px;
        height: 10px;
    }
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

/* Random Prompt Section (now inside carousel card) */
.random-prompt-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
    overflow: visible;
    min-height: auto;
    width: 100%;
}

/* Card flip container */
.card-flip-container {
    perspective: 1000px;
    margin-bottom: 30px;
    min-height: 200px;
    transition: min-height 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.card-inner {
    position: relative;
    width: 100%;
    min-height: 200px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    height: 100%;
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: relative;
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-sizing: border-box;
    overflow: visible;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: visible;
}

.random-prompt-card {
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.random-prompt-card.fade-out {
    opacity: 0;
}

.random-prompt-card.fade-in {
    animation: fadeIn 0.3s ease;
}

.prompt-text::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: #ff8c42;
    margin-top: 10px;
}

.card-type-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8a8a8a;
    margin-top: 12px;
    margin-bottom: 20px;
    font-weight: 400;
}

/* .random-prompt-metadata styles are defined later in the file */

.article-card {
    position: relative;
    min-height: 200px;
    padding: 40px;
    background: #fafafa;
    border-radius: 12px;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 1;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: opacity 0.3s ease;
}

.article-card.fade-out {
    opacity: 0;
}

.article-card.fade-in {
    animation: fadeIn 0.3s ease;
}

.article-card h2::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: #42a5f5;
    margin-top: 10px;
}

.game-card {
    position: relative;
    min-height: 200px;
    padding: 40px;
    background: #fafafa;
    border-radius: 12px;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 1;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: opacity 0.3s ease;
}

.game-card.fade-out {
    opacity: 0;
}

.game-card.fade-in {
    animation: fadeIn 0.3s ease;
}

.game-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: #4caf50;
    margin-top: 10px;
}

.game-loading,
.game-error {
    text-align: center;
    padding: 40px 20px;
    font-family: 'Inter', sans-serif;
    color: #666666;
}

.game-error p {
    margin-bottom: 10px;
}

.game-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: #000000;
    margin-bottom: 10px;
    line-height: 1.3;
}

.game-mode {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
    font-weight: 400;
}

.game-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin-top: 20px;
    margin-bottom: 25px;
}

.game-details-container {
    margin-top: 30px;
    margin-bottom: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-detail-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.game-detail-label {
    font-weight: 500;
    color: #2a2a2a;
    min-width: 80px;
}

.game-detail-value {
    color: #666666;
    font-weight: 300;
}

.game-example {
    margin-top: 25px;
}

.game-example-label {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 10px;
}

.game-example-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2a2a2a;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.article-card h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #000000;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.article-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #666666;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.article-card .summary {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #2a2a2a;
    margin-bottom: 30px;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.article-card .body-content {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #1a1a1a;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.article-card .body-content p {
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.article-card .key-points {
    margin-top: 30px;
    margin-bottom: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.article-card .key-points h4 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #000000;
}

.article-card .key-points ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-card .key-points li {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #2a2a2a;
    padding-left: 24px;
    position: relative;
}

.article-card .key-points li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000000;
    font-size: 1.2rem;
}

.article-loading,
.article-error {
    text-align: center;
    padding: 40px 20px;
    font-family: 'Inter', sans-serif;
    color: #666666;
}

.article-error p {
    margin-bottom: 20px;
}

/* Tooltip Modal */
.tooltip-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.tooltip-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease;
    margin: 20px;
    box-sizing: border-box;
    word-wrap: break-word;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.tooltip-close:hover {
    background: #f5f5f5;
    color: #000000;
}

.tooltip-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
    color: #000000;
    margin-bottom: 15px;
    padding-right: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.tooltip-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin: 0;
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.refresh-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: #666666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease, color 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 10;
    opacity: 0.7;
}

.refresh-button:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
    opacity: 1;
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.refresh-button:active {
    transform: scale(0.98) rotate(90deg);
}

.refresh-button svg {
    width: 16px;
    height: 16px;
}

.flip-button {
    padding: 10px 20px;
    border-radius: 24px;
    background: #000000;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.flip-button:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
}

.flip-button:active {
    transform: translateY(0);
}

.flip-button svg {
    width: 18px;
    height: 18px;
}

.flip-button span {
    display: inline-block;
}

.flip-button-center {
    margin: 0 auto;
}

.parent-article-button-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.article-button-container {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 30px;
    padding-bottom: 20px;
    flex-shrink: 0;
}

.prompt-metadata-container {
    margin-top: 30px;
    margin-bottom: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    width: 100%;
    box-sizing: border-box;
}

.prompt-metadata-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Metadata box styling - matches game-card and article-card metadata boxes */
.random-prompt-metadata {
    display: none;
    margin-top: 30px;
    margin-bottom: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.random-prompt-metadata[style*="display: block"] {
    display: block !important;
}

.metadata-toggle {
    width: 100%;
    position: relative;
    cursor: pointer;
    margin: 0;
    padding: 8px 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
}

.metadata-toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: #666666;
    background: #ffffff;
    padding: 0 4px;
}

.metadata-toggle.expanded .metadata-toggle-icon {
    transform: translateY(-50%) rotate(180deg);
}

.metadata-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards Page Filters */
.filters-section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.filters-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #000000;
    margin-bottom: 30px;
    text-align: center;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #2a2a2a;
    font-weight: 400;
}

.filter-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #000000;
}

.filter-button {
    grid-column: 1 / -1;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 14px 24px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.filter-button:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.card-display-section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    text-align: center;
}

/* Responsive adjustments for new pages */
@media (max-width: 768px) {
    .card-display,
    .auth-card,
    .filters-section,
    .card-display-section {
        padding: 30px 25px;
    }

    .card-title,
    .auth-title {
        font-size: 1.6rem;
    }

    .prompt-text {
        font-size: 1.5rem;
    }

    .filters-form {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 12px 20px 6px;
    }
    
    .logo {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
    
    .header-nav {
        position: relative;
        gap: 10px;
        flex-direction: column;
    }
    
    .sign-out-btn {
        position: static;
        margin-top: 5px;
        transform: none;
        font-size: 0.85rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .content {
        padding: 2px 10px;
    }

    .footer {
        padding: 40px 20px;
        width: 100%;
    }
    
    body:has(.cards-page-container) .footer {
        position: sticky;
        bottom: 0;
    }

    .tooltip-modal {
        padding: 20px;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .tooltip-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 40px);
        padding: 25px 20px;
        margin: 0;
        box-sizing: border-box;
        overflow-x: hidden;
        word-wrap: break-word;
    }

    .tooltip-title {
        font-size: 1.2rem;
        padding-right: 35px;
    }

    .tooltip-text {
        font-size: 0.9rem;
    }

    .logo {
        font-size: 2rem;
    }

    .content {
        padding: 0 10px;
    }
    
    .hero-section {
        padding: 30px 20px 30px;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .for-you-section {
        margin: 60px 20px 30px;
        padding: 40px 25px;
    }
    
    .for-you-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
    
    .for-you-list li {
        font-size: 1rem;
        padding: 12px 0;
        padding-left: 25px;
    }
    
    .feature-section {
        margin: 50px 20px 30px;
        padding: 40px 25px;
    }
    
    .feature-title {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    .feature-description {
        font-size: 1rem;
    }

    .path-line {
        display: block;
    }

    .content-box {
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 30px;
    }
    
    .content-box:first-of-type {
        margin-top: 0;
    }

    .content-box::before {
        display: block;
        top: -9px;
        left: 50%;
        right: auto;
        transform: translate(-50%, 0);
    }

    .content-box:hover::before {
        transform: translate(-50%, 0) scale(1.15);
    }

    .box-left::before,
    .box-right::before {
        left: 50%;
        right: auto;
        transform: translate(-50%, 0);
    }

    .content-box:hover.box-left::before,
    .content-box:hover.box-right::before {
        transform: translate(-50%, 0) scale(1.15);
    }

    .box-content {
        padding: 30px 25px;
    }

    .question {
        font-size: 2rem;
    }

    .answer {
        font-size: 2.5rem;
    }

    .app-name {
        font-size: 1.7rem;
    }

    .closing-line {
        font-size: 2.2rem;
    }

    .closing-tagline {
        font-size: 1.2rem;
    }
    
    /* Metadata box adjustments for smaller mobile */
    .random-prompt-metadata,
    .prompt-metadata-container {
        padding: 10px;
        margin-top: 15px;
    }
    
    .metadata-content,
    .prompt-metadata-content {
        gap: 6px;
    }
    
    .metadata-item {
        font-size: 0.7rem;
        gap: 5px;
    }
    
    .metadata-label {
        font-size: 0.7rem;
        min-width: 65px;
    }
    
    .metadata-value {
        font-size: 0.7rem;
    }
    
    .metadata-help {
        width: 11px;
        height: 11px;
    }
    
    .metadata-help svg {
        width: 9px;
        height: 9px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 25px 15px 10px;
    }

    .header-nav {
        gap: 20px;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .content {
        padding: 8px 10px;
    }

    .footer {
        padding: 30px 15px;
        width: 100%;
    }
    
    body:has(.cards-page-container) .footer {
        position: sticky;
        bottom: 0;
    }

    .tooltip-modal {
        padding: 15px;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .tooltip-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 30px);
        padding: 20px 15px;
        margin: 0;
        box-sizing: border-box;
        overflow-x: hidden;
        word-wrap: break-word;
    }

    .tooltip-title {
        font-size: 1.1rem;
        padding-right: 35px;
    }

    .tooltip-text {
        font-size: 0.85rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .box-content {
        padding: 25px 20px;
    }

    .question {
        font-size: 1.8rem;
    }

    .answer {
        font-size: 2.2rem;
    }

    .closing-line {
        font-size: 2rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: #f0f0f0;
    color: #000000;
}
