/* ============================
   Base Reset
============================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --red:       #c5242b;
    --red-dark:  #a31e24;
    --white:     #ffffff;
    --gray:      #c8c8c8;
    --gray-text: #9e9e9e;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e8e8e8;
    overflow-x: hidden;
}

/* ============================
   Loading Screen
============================ */
#loader {
    position: fixed;
    inset: 0;
    background: var(--red);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loader.loader--done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo-wrap {
    background: var(--white);
    border-radius: 24px;
    padding: 32px 44px;
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.3);
    animation: logoFloat 2.2s ease-in-out infinite;
}

.loader-logo {
    display: block;
    width: 148px;
    height: auto;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px);  }
    50%       { transform: translateY(-12px); }
}

.loader-bar-track {
    position: absolute;
    bottom: 64px;
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 3px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--white);
    border-radius: 3px;
    animation: barFill 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes barFill {
    0%   { width: 0%;   }
    50%  { width: 60%;  }
    80%  { width: 86%;  }
    100% { width: 100%; }
}

/* ============================
   Main App
============================ */
#app {
    min-height: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#app.app--visible {
    opacity: 1;
}

/* ============================
   Header
============================ */
.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--white);
    border-bottom: 3px solid var(--red);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 18px rgba(197, 36, 43, 0.14);
}

.app-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
    display: block;
}
/* ============================
   Title
============================ */

.title{
    text-align: center;
    color: black;
    font-size: 20px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 22px;
    margin-top:22px;
    font-weight: bold;
}

/* ============================
   KV Image
============================ */
.kv-section {
    width: 100%;
    flex-shrink: 0;
}

.kv-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================
   Survey Section
============================ */
.survey-section {
    padding: 22px 16px max(40px, env(safe-area-inset-bottom));
    flex: 1;
}
.survey-hint {
    text-align: center;
    /*color: #999;*/
    color:black;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.survey-hint-disc {
    font-style: italic;
    text-align: center;
    color: #999;
    font-size: 10px;
    letter-spacing: 0.4px;
    text-transform: normal;
    margin-bottom: 28px;
}

/* ============================
   Button Grid
============================ */
.btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.survey-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 130px;
    border-radius: 18px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    padding: 20px 12px;
    box-shadow: 0 6px 22px rgba(197, 36, 43, 0.38);
    position: relative;
    overflow: hidden;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

/* Subtle gloss overlay */
.survey-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.20) 0%, transparent 55%);
    pointer-events: none;
}

.survey-btn:active {
    transform: scale(0.94);
    box-shadow: 0 3px 10px rgba(197, 36, 43, 0.22);
}

.survey-btn--locked {
    background: var(--gray);
    box-shadow: none;
    pointer-events: none;
}

.btn-panel {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.survey-btn--locked .btn-panel {
    color: var(--gray-text);
}

.btn-text {
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    color: var(--white);
    line-height: 1.4;
    letter-spacing: 0.1px;
    word-break: break-word;
    hyphens: auto;
}

.survey-btn--locked .btn-text {
    color: var(--gray-text);
}

.btn-number {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.survey-btn--locked .btn-number {
    background: rgba(0, 0, 0, 0.08);
    color: var(--gray-text);
}

.lock-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    fill: #b5b5b5;
    flex-shrink: 0;
}

/* ============================
   Landscape safety
============================ */
@media (max-height: 500px) {
    .app-header { padding: 10px 20px; }
    .app-logo   { height: 36px; }
    .btn-grid   { gap: 10px; }
    .survey-btn { min-height: 100px; }
}
