/* =====================================================
   GLOBAL BASE
===================================================== */
:root {
    --accent: #2C497F;
    --text: #FFFFFF;
    --overlay: rgba(0,0,0,0.28);
}

body {
    margin: 0;
    padding: 0;
    font-family: "Playfair Display", serif;
    overflow: hidden;
    background: black;
    background-size: cover;
    background-position: center;
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

.hidden {
    display: none !important;
}

/* Operator hotspot */
#operator-hotspot {
    position: fixed;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    z-index: 9999;
}

/* =====================================================
   BEGIN SCREEN
===================================================== */
.begin-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.logo {
    width: 320px;
    margin-top: 40px;
    margin-bottom: 10px;
}

.event-name {
    margin-top: 20px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 24px;
    color: #2C497F;
    text-align: center;
}

.tagline {
    margin-top: 20px;
    margin-bottom: 35px;
    color: #2C497F;
    font-size: 24px;
    text-align: center;
}

/* Prompt pill */
.prompt-pill {
    background: rgba(255,255,255,0.92);
    color: #222;
    padding: 16px 26px;
    border-radius: 40px;
    display: inline-flex;
    gap: 18px;
    align-items: center;
    font-size: 22px;
    max-width: 80%;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-top: 25px;
    margin-bottom: 30px;
}

.prompt-arrow {
    font-size: 32px;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
}

/* Buttons */
.btn-group {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    width: 100%;
}

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px 26px;
    border-radius: 12px;
    font-size: 22px;
    width: 70vw;
    max-width: 340px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.btn.small {
    padding: 10px 20px;
    font-size: 18px;
}

.btn.circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    font-size: 32px;
    padding: 0;
}

.btn.outline {
    background: white;
    color: var(--accent);
    border: 2px solid var(--accent);
}

/* =====================================================
   CAMERA
===================================================== */
#camera-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    position: absolute;
    bottom: 50px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =====================================================
   COUNTDOWN
===================================================== */
.countdown {
    position: absolute;
    z-index: 20;
    width: 200px;
    height: 200px;
    top: calc(50% - 100px);
    left: calc(50% - 100px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-ring {
    position: absolute;
    transform: rotate(-90deg);
}

.ring-bg {
    stroke: rgba(255,255,255,0.25);
    stroke-width: 14;
    fill: none;
}

.ring-progress {
    stroke: var(--accent);
    stroke-width: 14;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 565;
    stroke-dashoffset: 565;
    transition: stroke-dashoffset linear;
}

.countdown-number {
    position: absolute;
    font-size: 58px;
    color: white;
    text-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

/* =====================================================
   PREVIEW
===================================================== */
.preview-media {
    max-width: 90%;
    max-height: 70vh;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* =====================================================
   EMAIL
===================================================== */
.email-content {
    position: relative;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.email-title {
    font-size: 26px;
    color: #2C497F;
    margin-bottom: 20px;
}

.email-input {
    padding: 14px;
    width: 70vw;
    max-width: 360px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 20px;
    margin-bottom: 22px;
}

/* =====================================================
   THANK YOU
===================================================== */
#thankyou-screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.thankyou-content {
    text-align: center;
}

.thankyou-text {
    font-size: 36px;
    color: white;
}

/* =====================================================
   GUESTBOOK
===================================================== */
.guestbook-content {
    text-align: center;
    width: 100%;
}

.guestbook-title {
    font-size: 32px;
    color: white;
    margin-bottom: 20px;
}

.guestbook-textarea {
    width: 80vw;
    max-width: 500px;
    height: 240px;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #ccc;
    font-size: 20px;
}

#guestbook-canvas {
    width: 85vw;
    max-width: 550px;
    height: 45vh;
    max-height: 380px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #ccc;
    touch-action: none; /* critical for drawing on iPhone */
}


/* =====================================================
   OPERATOR PANEL (FULL SCREEN)
===================================================== */
#operator-screen {
    position: fixed;
    inset: 0;
    background: white;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 30px;
    z-index: 10000;
}

#operator-screen.active {
    display: flex;
}

.operator-panel {
    background: #ffffff;
    width: 90%;
    max-width: 650px;
    height: 85vh;
    padding: 35px;
    border-radius: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.operator-title {
    font-size: 32px;
    font-weight: bold;
    color: #2C497F;
    text-align: center;
}

/* Form controls */
#operator-screen label {
    display: block;
    font-size: 18px;
    color: #333;
    margin-bottom: 6px;
}

.op-input,
.op-textarea,
#operator-screen select {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #fafafa;
}

.op-textarea {
    height: 180px;
    resize: vertical;
}

.op-button-row {
    display: flex;
    gap: 14px;
    justify-content: center;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 430px) {

    .logo {
        width: 250px;
    }

    .tagline {
        font-size: 20px;
    }

    .prompt-pill {
        font-size: 18px;
        padding: 12px 18px;
    }

    .btn {
        font-size: 18px;
        width: 80vw;
    }

    .event-name {
        font-size: 20px;
    }

    .countdown {
        width: 160px;
        height: 160px;
        top: calc(50% - 80px);
        left: calc(50% - 80px);
    }

    .countdown-number {
        font-size: 46px;
    }
}
/* Final fixed style placeholder */