@import url('https://fonts.googleapis.com/css2?family=Jua&family=Noto+Sans+KR:wght@400;700&display=swap');

:root {
    /* Right Spoon Friendly Palette */
    --color-bg: #fdfbf7;
    /* Warm, paper-like background */
    --color-primary: #ff6b6b;
    /* Soft Red/Coral */
    --color-primary-dark: #ee5253;
    --color-secondary: #48dbfb;
    /* Soft Blue */
    --color-text-main: #2d3436;
    --color-text-sub: #636e72;
    --color-card-bg: #ffffff;

    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);

    --radius-soft: 20px;
    --radius-round: 50px;

    --font-display: 'Jua', sans-serif;
    /* Round, friendly font */
    --font-body: 'Noto Sans KR', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
.logo-text,
.btn-large {
    font-family: var(--font-display);
}

h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.highlight {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

/* Underline effect for highlight */
.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255, 107, 107, 0.2);
    z-index: -1;
    border-radius: 4px;
}

.subtitle {
    color: var(--color-text-sub);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Layout */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 1.8rem;
    color: var(--color-primary);
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: -5px;
}

main {
    flex: 1;
    padding: 2rem 5%;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Views */
.view {
    width: 100%;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* Hero Section */
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.hero-image-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.hero-character {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 50%;
    /* Circle */
    border: 5px solid white;
    box-shadow: var(--shadow-soft);
    background: white;
}

.trust-badge {
    position: absolute;
    bottom: 0;
    right: -10px;
    background: var(--color-primary);
    color: white;
    font-family: var(--font-display);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
    transform: rotate(-5deg);
}

/* Buttons */
.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    border-radius: var(--radius-round);
    border: none;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-large.bouncy {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 8px 0 var(--color-primary-dark);
    margin-bottom: 8px;
    /* Compensate for shadow */
}

.btn-large.bouncy:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 var(--color-primary-dark);
}

.btn-large.outline {
    background: white;
    border: 2px solid #eee;
    color: var(--color-text-sub);
    margin-left: 1rem;
}

.btn-large.outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-text-sub);
    cursor: pointer;
}

.nav-btn.primary-btn {
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-round);
    padding: 0.5rem 1.2rem;
}

/* Features Grid */
.features-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
    flex: 0 1 300px;
    /* Base width */
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--color-text-sub);
}

/* Auth Pages */
.auth-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.auth-desc {
    color: var(--color-text-sub);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-main);
}

input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: var(--font-body);
}

textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    font-family: var(--font-body);
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 5px 0 var(--color-primary-dark);
}

.btn-block:active {
    transform: translateY(5px);
    box-shadow: none;
    margin-top: calc(1rem + 5px);
}

.auth-footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-sub);
}

.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
}

/* Mobile */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-container {
        margin-top: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .room-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Dashboard Extensions */
.dash-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: white;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
}

.dash-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.dash-header p {
    opacity: 0.9;
}

.chat-section {
    margin-bottom: 2.5rem;
}

.chat-section h3 {
    margin-bottom: 1rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.room-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 1.2rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.room-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
    color: var(--color-primary);
}

/* Notice Box */
.notice-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 0.9rem;
}

.notice-box strong {
    display: block;
    margin-bottom: 0.3rem;
    color: #856404;
}

.post-list {
    list-style: none;
    text-align: left;
}

.post-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.post-list li:hover {
    color: var(--color-primary);
}

.post-list .count {
    font-size: 0.8rem;
    color: var(--color-text-sub);
    background: #f1f2f6;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Form Extensions */
.row-group {
    display: flex;
    gap: 1rem;
}

.row-group .input-group {
    flex: 1;
}

select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    background-color: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.privacy-note {
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--color-text-sub);
    margin-bottom: 1.5rem;
    text-align: center;
}

.privacy-note strong {
    color: var(--color-text-main);
    display: block;
    margin-bottom: 0.2rem;
}

/* Age Verification */
.age-verification {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text-main);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    display: inline-block;
    position: relative;
}

.checkbox-container:hover input~.checkmark {
    border-color: var(--color-primary);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.warning-text {
    font-size: 0.8rem;
    color: #e53e3e;
    margin-top: 0.5rem;
    font-weight: 700;
}

/* New Dashboard Header */
.dash-header p.quote {
    font-style: italic;
    opacity: 0.8;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.profile-badge {
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.btn-micro {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

/* Action Grid (Matching/Debate) */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    padding: 1.5rem;
    border: none;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    color: white;
}

.action-card:hover {
    transform: scale(1.02);
}

.action-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-family: var(--font-display);
}

.action-card p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.action-card.primary {
    background: linear-gradient(135deg, #ff9f43, #ff6b6b);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.action-card.secondary {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
    box-shadow: 0 4px 15px rgba(72, 219, 251, 0.3);
}

/* Chat Room UI */
.chat-container {
    background: #f1f2f6;
    height: 80vh;
    /* Fixed height for chat window feel */
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid #dcdde1;
}

.chat-header {
    background: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.back-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 700;
}

.safety-banner {
    background: #fff3cd;
    padding: 0.8rem;
    font-size: 0.75rem;
    color: #856404;
    border-bottom: 1px solid #ffeeba;
    line-height: 1.4;
}

.safety-banner strong {
    color: #d35400;
    display: block;
    margin-bottom: 0.2rem;
}

.highlight-red {
    color: #c0392b;
    font-weight: 700;
    text-decoration: underline;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: #f8f9fa;
}

.system-message {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-sub);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    align-self: center;
    margin: 1rem 0;
}

.chat-input-area {
    background: white;
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    border-top: 1px solid #eee;
}

.attach-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-sub);
    transition: color 0.2s;
}

.attach-btn:hover {
    color: var(--color-primary);
}

.msg-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f9f9f9;
}

.send-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
}