:root {
    /* Light Theme Colors */
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 1);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes for Light Glassmorphism */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #bbf7d0 0%, transparent 70%);
}

.shape-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #dcfce7 0%, transparent 70%);
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, #ecfccb 0%, transparent 70%);
}

#app {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    z-index: 1;
}

.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.view.active {
    display: flex;
    justify-content: center;
    opacity: 1;
    animation: fadeIn 0.5s ease;
}

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

/* Glass Card - Light Version */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05), 0 0 15px rgba(255, 255, 255, 0.5) inset;
}

.dashboard-card {
    max-width: 900px;
}

.text-center {
    text-align: center;
}

.org-logo {
    max-width: 300px;
    max-height: 180px;
    margin: 0 auto 15px auto;
    display: block;
    object-fit: contain;
}

.org-logo-small {
    max-width: 250px;
    max-height: 150px;
    margin: 0 auto 15px auto;
    display: block;
    object-fit: contain;
}

h1 {
    font-size: 2rem;
    margin: 10px 0;
    font-weight: 700;
}

.org-title {
    font-size: clamp(14px, 4.5vw, 0.7em);
    white-space: nowrap;
    display: inline-block;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

h3 {
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Forms & Inputs */
.setup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.setup-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mt-2 {
    margin-top: 20px;
}

input[type="text"], .form-select {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) inset;
}

.form-select {
    min-width: 120px;
    padding: 12px;
    cursor: pointer;
}

input[type="text"]::placeholder {
    color: #94a3b8;
}

input[type="text"]:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.25);
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
    background: rgba(241, 245, 249, 0.8);
    color: var(--text-primary);
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: rgba(226, 232, 240, 0.9);
}

.btn-danger {
    background: rgba(254, 226, 226, 0.8);
    color: var(--danger);
    border: 1px solid #fca5a5;
}

.btn-danger:hover {
    background: rgba(252, 165, 165, 0.8);
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-text:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

/* Lists */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 10px;
    font-size: 0.875rem;
}

.activity-list {
    list-style: none;
    padding: 0;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.activity-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.activity-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 1.2rem;
}

/* Survey View */
.survey-card {
    padding: 30px 20px;
    max-width: 700px;
}

.survey-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.emoji-row-wrapper {
    margin-bottom: 30px;
    background: rgba(255,255,255,0.4);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.emoji-row-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.2rem;
}

.emoji-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.emoji-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.emoji-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: white;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.emoji-btn:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.emoji-btn.selected {
    border-color: #6366f1;
    background: #eef2ff;
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.emoji-label {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.survey-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 10px;
}

/* Thank you overlay */
.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 24px;
}

.overlay.hidden {
    display: none;
}

.success-card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transform: scale(0.9);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-icon {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 10px;
    animation: bounce 1s infinite alternate;
}

@keyframes popIn {
    to { transform: scale(1); }
}

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

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.avg-score {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
    text-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-emoji {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.bar-track {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) inset;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease-out;
}

.bar-count {
    width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .glass-card {
        padding: 25px 15px;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .emoji-container {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 5px;
    }
    .emoji-btn {
        width: 50px;
        height: 50px;
        font-size: 2rem;
        border-width: 1px;
    }
    .emoji-label {
        font-size: 0.65rem;
    }
    .emoji-row-wrapper {
        padding: 15px 5px;
    }
    .setup-options {
        flex-direction: column;
    }
    .form-select, .btn-primary {
        width: 100%;
    }
}
