/* =====================================================
   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;
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
}

.screen.active {
    display: flex;
}

.hidden {
    display: none !important;
}

/* Invisible operator hotspot */
#operator-hotspot {
    position: fixed;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    z-index: 9999;
}


/* =====================================================
   BACKGROUND + OVERLAY
===================================================== */
.overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    z-index: 1;
}

.begin-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

/* =====================================================
   BEGIN SCREEN
===================================================== */
.logo {
    width: 320px;
    margin-top: 40px;
    margin-bottom: 10px;
}

.tagline {
    margin-top: 20px; /* NEW - gives breathing room */
    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;     /* space above */
    margin-bottom: 30px;  /* space below */
}

.prompt-arrow {
    font-size: 32px;
    color: var(--accent);
    cursor: pointer;
    user-select: none;
}

.event-name {
    margin-top: 20px;
    margin-bottom: 25px;
    font-weight: 600; /* BOLD */
    font-size: 24px;
    color: #2C497F;
    text-align: center;
}

/* Button groups */
.btn-group {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;   /* NEW */
    justify-content: center; /* NEW */
    width: 100%;           /* NEW */
}

/* Buttons */
.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);
    margin-left: auto;       /* NEW */
    margin-right: auto;      /* NEW */
}

.btn:hover {
    opacity: 0.9;
}

.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 SCREEN
===================================================== */

#camera-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Camera buttons */
.camera-controls {
    position: absolute;
    bottom: 50px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =====================================================
   COUNTDOWN RING
===================================================== */
.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; /* 2πr with r=90 */
    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 SCREEN
===================================================== */
.preview-media {
    max-width: 90%;
    max-height: 70vh;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* =====================================================
   EMAIL SCREEN
===================================================== */
.email-input {
    padding: 14px;
    width: 70vw;
    max-width: 360px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 20px;
    margin-bottom: 22px;
}

.email-title {
    font-size: 26px;
    color: #2C497F;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.email-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* =====================================================
   THANK YOU
===================================================== */
.thankyou-message {
    font-size: 36px;
    color: white;
    text-align: center;
    padding: 40px;
}

#thankyou-screen {
    /* do NOT force display: flex */
}

#thankyou-screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}


.thankyou-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.thankyou-text {
    font-size: 36px;
    color: white;
    text-align: center;
}


/* =====================================================
   GUESTBOOK
===================================================== */
.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: 80vw;
    max-width: 500px;
    height: 40vh;
    max-height: 350px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 12px;
}


.guestbook-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* =====================================================
     OPERATOR PANEL (CENTERED MODAL)
===================================================== */
#operator-screen {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#operator-screen {
    display: none; /* NEW - forces initial hide */
}


.operator-panel {
    background: #ffffff;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    padding: 35px;
    border-radius: 18px;
    overflow-y: auto;
    box-shadow: 0 10px 35px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.operator-title {
    font-size: 32px;
    font-weight: bold;
    color: #2C497F;
    text-align: center;
    margin-bottom: 10px;
}

/* labels */
#operator-screen label {
    display: block;
    font-size: 18px;
    color: #333;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* inputs */
.op-input,
.op-textarea,
#operator-screen select {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #fafafa;
}

/* textarea */
.op-textarea {
    height: 180px;
    resize: vertical;
}

/* button row */
.op-button-row {
    display: flex;
    gap: 14px;
    justify-content: center;
}

/* =====================================================
   OPERATOR PANEL (MODAL)
===================================================== */

#operator-screen {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none; /* Must be hidden initially */
    justify-content: center;
    align-items: center;
    z-index: 10000; /* big enough to stay above overlay */
}

#operator-screen.active {
    display: flex;
}

.operator-panel {
    background: #fff;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    padding: 35px;
    border-radius: 18px;
    overflow-y: auto;
    box-shadow: 0 10px 35px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10001; /* higher than container */
}


/* =====================================================
   MOBILE 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;
    }
}
