/* === DEBUG MODUS FOR MACBOOK (PHYSISCH UM 90° GEDREHT) === */

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000 !important;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Dreht die gesamte App um 90° für den Mac-Screen */
.screen.active {
    width: 100vh !important;
    height: 100vw !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
    border-radius: 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#webcam, #overlayCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', Roboto, sans-serif;
    user-select: none;
}

body {
    background-color: #f2f4f7;
    color: #111111;
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: none;
    height: 100vh;
    width: 100vw;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* === WELCOME SCREEN === */
#welcomeScreen {
    background: #ffffff;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
}

.logo {
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2rem;
    font-weight: 700;
}

#welcomeScreen h1 {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    color: #111;
    line-height: 1.15;
}

#welcomeScreen p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.primary-btn {
    background: #111111;
    color: #ffffff;
    border: none;
    padding: 1.4rem 3.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
}

.primary-btn:active {
    transform: scale(0.96);
}

/* === KIOSK HOCHFORMAT CONTAINER (9:16) === */
.kiosk-portrait-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: #f8f9fb;
}

/* Kamera Bereich (Startet groß, schrumpft nach Scan) */
.camera-card {
    position: relative;
    width: 100%;
    height: 70vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Kompakter Modus nach Foto-Aufnahme */
.camera-card.compact {
    height: 28vh;
    border-bottom: 1px solid #e5e5e5;
}

.scan-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    z-index: 10;
    color: #fff;
    font-size: 1rem;
}

.back-link {
    background: rgba(255,255,255,0.25);
    border: none;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

#webcam, #overlayCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

#overlayCanvas {
    z-index: 2;
}

/* Foto Blitz */
.flash {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}
.flash-anim {
    animation: flashAnimation 0.3s ease-out;
}
@keyframes flashAnimation {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.scan-trigger {
    position: absolute;
    bottom: 2rem;
    z-index: 15;
    background: #ffffff;
    color: #111;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Unterer Bereich für Ergebnisse / Skizzen */
.results-sheet {
    flex: 1;
    padding: 1.5rem;
    background: #ffffff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.placeholder-prompt {
    text-align: center;
    margin: auto;
    color: #888;
    font-size: 1.1rem;
}

/* Banner für erkannte Form */
.shape-result-banner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: #f4f6f9;
    padding: 1.2rem;
    border-radius: 14px;
    border: 1px solid #e2e6eb;
}

.shape-icon {
    font-size: 2rem;
    background: #ffffff;
    padding: 0.6rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.shape-result-banner h3 {
    font-size: 1.1rem;
    color: #111;
    margin-bottom: 0.2rem;
}

.shape-result-banner p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Interaktive Stil-Karten */
.style-card {
    background: #f8f9fb;
    border-radius: 14px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    transition: all 0.3s ease;
}

.style-card-main {
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.style-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.style-info .num {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    background: #e5e9f0;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.style-card-main h4 {
    font-size: 1.1rem;
    color: #111;
}

.arrow {
    font-size: 0.8rem;
    color: #888;
    transition: transform 0.3s ease;
}

.style-card.open .arrow {
    transform: rotate(180deg);
}

/* Ausklappbarer Detail-Bereich für den Friseur */
.style-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.2rem;
    background: #ffffff;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.style-card.open .style-details {
    max-height: 250px;
    padding: 0 1.2rem 1.2rem 1.2rem;
    border-top: 1px solid #eaeaea;
}

.style-details p {
    font-size: 0.95rem;
    color: #555;
    margin: 1rem 0;
    line-height: 1.4;
}

.friseur-box {
    background: #f4f6f9;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #333;
    border-left: 3px solid #111;
}

/* Lade-Spinner */
.loading-box {
    margin: auto;
    text-align: center;
    color: #666;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eaeaea;
    border-top: 4px solid #111;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-pop {
    animation: popIn 0.3s ease forwards;
}