/* ──────────────────────────────────────────
   Fonts & reset
────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ──────────────────────────────────────────
   Background & layout
────────────────────────────────────────── */
body {
    min-height: 100vh;
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #ffe0ec 0%, #ffd6e8 30%, #e8d5ff 65%, #d5eaff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem 4rem;
    overflow-x: hidden;
}

/* Floating hearts in the background */
.hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.heart-float {
    position: absolute;
    bottom: -60px;
    font-size: 1.4rem;
    opacity: 0;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0%   { transform: translateY(0) scale(1) rotate(-15deg); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-110vh) scale(1.3) rotate(15deg); opacity: 0; }
}

/* ──────────────────────────────────────────
   Main card
────────────────────────────────────────── */
.card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 40px rgba(200, 100, 160, 0.18), 0 2px 8px rgba(0,0,0,0.08);
    border: 1.5px solid rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
}

/* ──────────────────────────────────────────
   Header
────────────────────────────────────────── */
.site-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 7vw, 2.8rem);
    background: linear-gradient(135deg, #ff6b9d, #c44dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    line-height: 1.2;
}
.site-subtitle {
    text-align: center;
    color: #a07ab8;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.4rem;
    margin-bottom: 2rem;
}

/* ──────────────────────────────────────────
   Slot machine
────────────────────────────────────────── */
.slot-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(160deg, #fff0f7 0%, #f8f0ff 100%);
    border: 2px solid rgba(255, 107, 157, 0.25);
    box-shadow: inset 0 2px 12px rgba(180, 80, 140, 0.08);
    margin-bottom: 1.8rem;
}

/* Gradient masks top & bottom – give slot-machine depth */
.slot-wrapper::before,
.slot-wrapper::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 80px;
    z-index: 2;
    pointer-events: none;
}
.slot-wrapper::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255,240,247,1) 0%, rgba(255,240,247,0) 100%);
}
.slot-wrapper::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(248,240,255,1) 0%, rgba(248,240,255,0) 100%);
}

/* Highlight band at centre */
.slot-highlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    height: 120px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,107,157,0.12), rgba(196,77,255,0.12));
    border: 2px solid rgba(255,107,157,0.3);
    z-index: 1;
    pointer-events: none;
}

/* The scrolling reel */
.slot-reel {
    position: absolute;
    top: 0; left: 0; right: 0;
    will-change: transform;
}
.slot-item {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    text-align: center;
}
.slot-item span {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    font-weight: 700;
    color: #5a2d72;
    line-height: 1.4;
}

/* Idle state (before first spin) */
.slot-idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 3;
}
.slot-idle .idle-emoji { font-size: 3rem; }
.slot-idle .idle-text {
    font-family: 'Pacifico', cursive;
    font-size: 1.1rem;
    color: #c44dff;
}

/* Result shown after spin */
.slot-result {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    z-index: 3;
    padding: 1rem 1.5rem;
    text-align: center;
}
.slot-result.visible { display: flex; }
.slot-result .result-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff6b9d;
}
.slot-result .result-text {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    background: linear-gradient(135deg, #ff6b9d, #c44dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
}
.result-category {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b9d22, #c44dff22);
    border: 1px solid rgba(196,77,255,0.3);
    color: #8a2db5;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
}

/* ──────────────────────────────────────────
   Spin button
────────────────────────────────────────── */
.btn-spin {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b9d, #c44dff);
    color: #fff;
    font-family: 'Pacifico', cursive;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(196,77,255,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}
.btn-spin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(196,77,255,0.45);
}
.btn-spin:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 4px 16px rgba(196,77,255,0.3);
}
.btn-spin:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
/* Shimmer effect on the button */
.btn-spin::after {
    content: '';
    position: absolute;
    top: -50%; left: -75%;
    width: 50%; height: 200%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: shimmer 2.8s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { left: -75%; }
    60%  { left: 125%; }
    100% { left: 125%; }
}

/* ──────────────────────────────────────────
   Add idea panel
────────────────────────────────────────── */
.section-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.3rem;
    color: #c44dff;
    margin-bottom: 1rem;
    text-align: center;
}

.add-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.add-form input,
.add-form select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(196,77,255,0.25);
    border-radius: 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3a2050;
    background: rgba(255,255,255,0.8);
    outline: none;
    transition: border-color 0.2s;
}
.add-form input:focus,
.add-form select:focus {
    border-color: #c44dff;
}
.add-form input::placeholder { color: #b89dc8; }

.btn-add {
    padding: 0.75rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6b9d, #c44dff);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(196,77,255,0.3);
}
.btn-add:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(196,77,255,0.4); }
.btn-add:active { transform: translateY(1px); }

.add-feedback {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    min-height: 1.2em;
    color: #c44dff;
}

/* ──────────────────────────────────────────
   Ideas list
────────────────────────────────────────── */
.ideas-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.ideas-list::-webkit-scrollbar { width: 6px; }
.ideas-list::-webkit-scrollbar-track { background: transparent; }
.ideas-list::-webkit-scrollbar-thumb { background: rgba(196,77,255,0.3); border-radius: 3px; }

.idea-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255,255,255,0.6);
    border: 1.5px solid rgba(196,77,255,0.15);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    animation: slideIn 0.25s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.idea-row .idea-cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.idea-row .idea-text {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #3a2050;
    line-height: 1.4;
}
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.4;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
    padding: 2px;
    line-height: 1;
}
.btn-delete:hover { opacity: 1; transform: scale(1.2); }

/* Category colours */
.cat-outdoor  { background: #d4f5e9; color: #1a7a4a; }
.cat-indoor   { background: #fde8ff; color: #8a2db5; }
.cat-activity { background: #fff0d4; color: #8a5a00; }
.cat-food     { background: #ffd4d4; color: #8a1a1a; }
.cat-culture  { background: #d4e8ff; color: #1a3a8a; }
.cat-other    { background: #efefef; color: #555; }

/* ──────────────────────────────────────────
   Misc
────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1.5px solid rgba(196,77,255,0.15);
    margin: 1.5rem 0;
}

.empty-state {
    text-align: center;
    color: #b89dc8;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 1rem;
}

/* ──────────────────────────────────────────
   Delete confirmation modal
────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 20, 80, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    animation: fadeIn 0.15s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 12px 48px rgba(196,77,255,0.25);
    border: 1.5px solid rgba(196,77,255,0.2);
    animation: popIn 0.2s ease;
}
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
.modal-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.2rem;
    color: #c44dff;
    margin-bottom: 0.6rem;
}
.modal-body {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3a2050;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.modal-pw-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid rgba(196,77,255,0.3);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3a2050;
    background: rgba(255,255,255,0.8);
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 0.5rem;
}
.modal-pw-input:focus { border-color: #c44dff; }
.modal-feedback {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e03070;
    min-height: 1.1em;
    margin-bottom: 1rem;
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
}
.btn-modal-cancel {
    flex: 1;
    padding: 0.65rem;
    border: 2px solid rgba(196,77,255,0.3);
    border-radius: 12px;
    background: transparent;
    color: #8a2db5;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-modal-cancel:hover { background: rgba(196,77,255,0.08); }
.btn-modal-confirm {
    flex: 1;
    padding: 0.65rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b9d, #c44dff);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.15s;
    box-shadow: 0 4px 14px rgba(196,77,255,0.3);
}
.btn-modal-confirm:hover { opacity: 0.9; }
.btn-modal-confirm:disabled { opacity: 0.6; cursor: not-allowed; }
