@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #E02440;
    --primary-hover: #c01b33;
    --primary-light: #fbe9ec;
    --primary-gradient: linear-gradient(135deg, #ff6b81 0%, #E02440 100%);
    --bg-gradient: linear-gradient(180deg, #ea334d 0%, #850b18 100%);
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E2E8F0;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Splash Container (Like service-evaluation) */
.splash-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
    position: relative;
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    text-align: center;
    color: white;
    overflow: hidden;
}

/* Dot Pattern Background Overlay */
.splash-container::before,
.app-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2.5' cy='2.5' r='1.2' fill='rgba(0,0,0,0.1)'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.2' fill='rgba(0,0,0,0.1)'/%3E%3C/svg%3E");
    z-index: 0;
    pointer-events: none;
}

/* Top White Curve */
.splash-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -25%;
    width: 150%;
    height: 32%;
    background-color: white;
    border-radius: 0 0 50% 50%;
    z-index: 1;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .splash-container::after {
        left: -10%;
        width: 120%;
        height: 28%;
        border-radius: 0 0 50% 50% / 0 0 100% 100%;
    }
}

.splash-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    flex-grow: 1;
    justify-content: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.logo-img {
    max-width: 320px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.splash-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.splash-subtitle {
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    color: #4a4a4a;
    width: 100%;
    padding: 0 10px;
    text-align: center;
    line-height: 1.6;
    margin-top: 0;
    padding-bottom: 2rem;
    font-weight: 500;
}

.edpex-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}

.btn-wrapper {
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .btn-wrapper {
        max-width: 520px;
    }
}

.btn-menu {
    width: 100%;
    padding: 1.4rem 1.2rem;
    font-size: 1.15rem;
    background: white;
    color: #850b18;
    border-radius: 14px;
    border: 2px solid white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    cursor: pointer;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-menu:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    background: #fffdfd;
}

.btn-menu-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

.btn-menu-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-text {
    display: inline-block;
    animation: text-pulse 2.2s infinite ease-in-out;
}

@keyframes text-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.03); opacity: 0.92; }
}

.btn-fullscreen {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(224, 36, 64, 0.3);
    color: #E02440;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.btn-fullscreen:hover {
    background: #fff;
    transform: scale(1.03);
}

.btn-fullscreen svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Evaluation Wizard Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-gradient);
    position: relative;
    padding-bottom: 2rem;
}

.wavy-header {
    background: transparent;
    color: white;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 820px;
}

.wavy-header h1 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.wavy-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.wizard-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.2rem 2rem;
    flex-grow: 1;
    margin: 0 1rem;
    z-index: 10;
    position: relative;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 820px;
}

/* Wizard Steps */
.wizard-step {
    display: none;
    animation: fadeIn 0.35s ease-out forwards;
}

.wizard-step.active {
    display: block;
}

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

.step-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

/* Form Groups & Cards */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.form-label.required::after {
    content: " *";
    color: var(--primary-color);
}

/* Form Select Dropdown */
.form-select {
    width: 100%;
    padding: 0.9rem 1.1rem;
    padding-right: 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Prompt', sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 16px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: var(--transition);
}

.form-select:hover {
    border-color: #cbd5e1;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 36, 64, 0.12);
}

/* Meeting Rooms Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.room-card {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem;
    cursor: pointer;
    background: #ffffff;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.room-card:hover {
    border-color: #f87171;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(224, 36, 64, 0.08);
}

.room-card.selected {
    border-color: var(--primary-color);
    background-color: #fff8f8;
    box-shadow: 0 4px 14px rgba(224, 36, 64, 0.12);
}

.room-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.room-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.room-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.room-card.selected .room-icon-box {
    background: var(--primary-color);
    color: #fff;
}

.room-name-th {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-main);
    line-height: 1.3;
}

.room-name-en {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.room-capacity {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    color: #64748b;
    margin-top: 0.5rem;
    align-self: flex-start;
}

/* User Status & Purpose Radio Pills / Cards */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.options-grid.single-column {
    grid-template-columns: 1fr;
}

.option-card {
    border: none;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
}

.option-card:hover {
    background: #f8fafc;
}

.option-card.selected {
    background: #fff5f5;
    color: var(--primary-color);
    font-weight: 600;
}

.option-card input[type="radio"] {
    accent-color: var(--primary-color);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Section Header (EdPEx Dimension) */
.section-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.section-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Question Item */
.question-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.question-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.question-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.question-code {
    display: inline-block;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 6px;
}

/* Rating Scale 1-5 (Matching service-evaluation style) */
.rating-scale-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    padding: 0.5rem 0;
}

.rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

.rating-item input[type="radio"] {
    display: none;
}

.rating-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
    background: #ffffff;
}

.rating-item:hover .rating-circle {
    transform: scale(1.1);
}

.rating-item input:checked + .rating-circle {
    color: #ffffff !important;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Rating Colors (Red to Green) */
.rating-item:nth-child(1) .rating-circle { border-color: #EF4444; color: #EF4444; }
.rating-item:nth-child(2) .rating-circle { border-color: #F97316; color: #F97316; }
.rating-item:nth-child(3) .rating-circle { border-color: #EAB308; color: #EAB308; }
.rating-item:nth-child(4) .rating-circle { border-color: #84CC16; color: #84CC16; }
.rating-item:nth-child(5) .rating-circle { border-color: #22C55E; color: #22C55E; }

.rating-item:nth-child(1) input:checked + .rating-circle { background-color: #EF4444; border-color: #EF4444; }
.rating-item:nth-child(2) input:checked + .rating-circle { background-color: #F97316; border-color: #F97316; }
.rating-item:nth-child(3) input:checked + .rating-circle { background-color: #EAB308; border-color: #EAB308; }
.rating-item:nth-child(4) input:checked + .rating-circle { background-color: #84CC16; border-color: #84CC16; }
.rating-item:nth-child(5) input:checked + .rating-circle { background-color: #22C55E; border-color: #22C55E; }

.rating-label {
    font-size: 0.78rem;
    margin-top: 0.4rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

@media (max-width: 540px) {
    .rating-circle { width: 38px; height: 38px; font-size: 1rem; }
    .rating-label { font-size: 0.7rem; }
}

/* Quick Suggestion Pills */
.suggestion-box-wrapper {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
    margin-bottom: 0.75rem;
}

.btn-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.82rem;
    color: #475569;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff8f8;
    transform: translateY(-1px);
}

.form-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition);
    background: #fff;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 36, 64, 0.12);
}

/* Wizard Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(224, 36, 64, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(224, 36, 64, 0.35);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Progress Container */
.progress-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.progress-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    width: 28px;
    border-radius: 10px;
}

/* Success Screen */
.success-step {
    text-align: center;
    padding: 3rem 1.5rem;
}

.success-icon-box {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-step h2 {
    font-size: 1.8rem;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.success-step p {
    color: #64748b;
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto 1.5rem auto;
}

.countdown-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* Admin Dashboard & Google Forms Summary Styling */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.main-content {
    flex-grow: 1;
    padding: 2rem 2.5rem;
    overflow-x: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    font-size: 1.7rem;
    color: #0f172a;
}

.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    padding: 1.4rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-top: 4px solid var(--primary-color);
}

.stat-card-title {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-card-sub {
    font-size: 0.8rem;
    color: #10b981;
    margin-top: 0.2rem;
}

/* Google Forms Style Chart Card */
.gf-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.gf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.gf-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.gf-response-count {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.gf-badge-avg {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.gf-chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 220px;
}

/* Text responses list */
.gf-response-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.gf-response-item {
    background: #f8fafc;
    border-left: 3px solid var(--primary-color);
    padding: 0.9rem 1.1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.92rem;
    color: #334155;
}

.gf-response-item .meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.4rem;
}
