/* Spin Wheel App - NetDynamic.Net - Mobile First Design */
/* v0.4.3-alpha */

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

/* Twemoji emoji images */
img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 0.05em 0 0.1em;
    vertical-align: -0.1em;
    display: inline;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #22c55e;
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --danger-color: #ef4444;
    --gold-color: #fbbf24;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: -webkit-fill-available;
    max-width: 100vw;
    overflow: hidden;
}

/* Header */
.app-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.4rem 1.5rem;
    background: var(--surface-color);
    position: relative;
    flex-shrink: 0;
}

.app-header h1 {
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
    max-width: 90%;
    word-wrap: break-word;
    line-height: 1.3;
}

.app-header h1:hover {
    background: var(--border-color);
}

.app-header h1:focus {
    outline: 2px solid var(--primary-color);
    background: var(--border-color);
}

.settings-btn {
    position: absolute;
    right: 0.25rem;
    top: 0.25rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.settings-btn:hover {
    background: var(--border-color);
}

.gallery-btn {
    position: absolute;
    left: 0.25rem;
    top: 0.25rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.gallery-btn:hover {
    background: var(--border-color);
}

/* Main Wheel Section */
.wheel-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
    overflow: hidden;
    position: relative;
}

.wheel-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: min(90vw, 50vh, 400px);
    height: min(90vw, 50vh, 400px);
    z-index: 1;
}

.wheel-center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    pointer-events: none;
}

.wheel-center-logo.hidden {
    display: none;
}

.wheel-center-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.wheel-center-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 10;
    pointer-events: none;
    display: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.wheel-center-emoji.visible {
    display: block;
}

.wheel-center-emoji.swinging {
    animation: emojiSwing 0.8s ease-in-out infinite;
    transform-origin: 50% 0%;
}

@keyframes emojiSwing {
    0%, 100% { transform: translate(-50%, -50%) rotate(-8deg); }
    50% { transform: translate(-50%, -50%) rotate(8deg); }
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: var(--gold-color);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    text-shadow: 0 0 10px var(--gold-color);
}

#wheelCanvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
    box-shadow:
        0 0 0 8px var(--surface-color),
        0 0 0 12px var(--primary-color),
        0 0 30px rgba(99, 102, 241, 0.4);
}

/* Spin Button */
.spin-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.spin-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.spin-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spin-buttons {
    position: fixed;
    top: calc(50% + min(45vw, 25vh, 200px) + 20px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 2;
}

.respin-btn {
    display: none;
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.4);
}

.respin-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.respin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.6);
}

.respin-btn:active {
    transform: scale(0.95);
}

/* Winner Display - Simple text under wheel */
.winner-display {
    display: none;
    position: fixed;
    top: calc(50% + min(45vw, 25vh, 200px) + 90px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 0.5rem 1rem;
    z-index: 2;
}

.winner-display.visible {
    display: block;
}

.winner-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gold-color);
}

/* Footer */
.credit-tag {
    position: fixed;
    bottom: 35px;
    right: 15px;
    font-size: 9px;
    color: var(--text-muted);
    z-index: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Darker background for celebration modal */
.celebration-modal {
    background: rgba(0, 0, 0, 0.92);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.close-btn:hover {
    background: var(--border-color);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Setting Groups */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-group input[type="text"],
.setting-group input[type="number"],
.setting-group textarea {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 1rem;
    width: 100%;
}

.setting-group input:focus,
.setting-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.setting-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.setting-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
    border: none;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: var(--text-muted);
}

.save-btn {
    margin-top: 0.5rem;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.button-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.button-row .btn-danger {
    flex: 1;
}

.button-row .btn-primary {
    flex: 2;
}

/* Available Students List */
.available-students-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
}

.available-student {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.available-student:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.available-student.added {
    opacity: 0.4;
    pointer-events: none;
}

.available-student img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.available-student .no-photo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.available-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 100%;
}

/* Players List */
.players-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.player-item:last-child {
    border-bottom: none;
}

.player-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-photo .no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--surface-color);
}

.player-color-bar {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-flag {
    font-size: 1rem;
    margin-left: 0.3rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.player-slices {
    width: 36px;
    padding: 0.2rem 0.25rem;
    font-size: 0.85rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-align: center;
    -moz-appearance: textfield;
}

.player-slices::-webkit-outer-spin-button,
.player-slices::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.player-slices:focus {
    outline: none;
    border-color: var(--primary-color);
}

.slices-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.player-weight {
    width: 32px;
    padding: 0.2rem 0.25rem;
    font-size: 0.85rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-align: center;
    -moz-appearance: textfield;
}

.player-weight::-webkit-outer-spin-button,
.player-weight::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.player-weight:focus {
    outline: none;
    border-color: var(--primary-color);
}

.player-percent {
    font-size: 0.8rem;
    color: var(--gold-color);
    font-weight: 600;
    min-width: 38px;
    text-align: right;
}

.player-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.player-remove:hover {
    opacity: 1;
}

.players-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.weight-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
}

/* Celebration Modal - Pokemon Card Style */
.celebration-modal {
    perspective: 1000px;
}

.celebration-modal .celebration-content {
    background: transparent;
    text-align: center;
    position: relative;
    max-width: 90vw;
    perspective: 800px;
    margin-top: -75px;
    z-index: 2;
}

.winner-card {
    position: relative;
    width: 280px;
    height: 400px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    padding: 12px;
    border: 4px solid var(--gold-color);
    box-shadow:
        0 0 30px rgba(251, 191, 36, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 80px rgba(251, 191, 36, 0.05);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        125deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 30%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.05) 70%,
        transparent 100%
    );
    border-radius: 14px;
    pointer-events: none;
    animation: holoShine 3s ease-in-out infinite;
    z-index: 0;
}

.winner-card::after {
    content: '✦';
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 0 5px white, 0 0 10px gold;
    opacity: 0;
    z-index: 999;
    transition: opacity 0.3s;
}

.winner-card.sparkle::after {
    animation: sparkle 2.6s ease-out 2;
}

@keyframes holoShine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    12% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
        text-shadow: 0 0 20px white, 0 0 40px gold, 0 0 60px gold;
    }
    23% {
        opacity: 0;
        transform: scale(0.8) rotate(360deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) rotate(360deg);
    }
}

/* Traveling shine line - hidden by default */
.winner-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 35%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.08) 65%,
        transparent 100%
    );
    transform: rotate(25deg) translateY(-25%);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    filter: blur(8px);
}

.winner-card-inner.shine::before {
    opacity: 1;
    animation: shineTravel 0.5s ease-in-out forwards;
}

.winner-card-inner.shine-reverse::before {
    opacity: 1;
    animation: shineTravelReverse 0.5s ease-in-out forwards;
}

@keyframes shineTravel {
    0% { left: -100%; }
    100% { left: 150%; }
}

@keyframes shineTravelReverse {
    0% { left: 150%; }
    100% { left: -100%; }
}

@keyframes cardAppear {
    0% { transform: scale(0.3) rotateY(-40deg); opacity: 0; }
    60% { transform: scale(1.1) rotateY(10deg); }
    100% { transform: scale(1) rotateY(0); opacity: 1; }
}

.celebration-modal.active .winner-card {
    animation: cardAppear 0.6s ease-out;
}

.celebration-title {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--gold-color);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--gold-color);
    margin-bottom: 1rem;
    position: relative;
    top: -15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: plaquePop 0.5s ease-out;
}

@keyframes plaquePop {
    0% {
        transform: scale(0.3) translateY(200px);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) translateY(-10px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.winner-card-inner {
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    border-radius: 10px;
    height: calc(100% - 16px);
    width: calc(100% - 16px);
    margin: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid rgba(251, 191, 36, 0.3);
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    /* Clip the shine effect at card edges */
    clip-path: inset(0 round 10px);
}

.winner-card-stars {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    font-size: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.winner-card-type {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold-color), #f59e0b);
    color: #1a1a2e;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 16px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.winner-photo-large {
    flex: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #4a4a6a 0%, #2a2a4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.winner-announce {
    padding: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold-color);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, transparent 100%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    border-top: 2px solid rgba(251, 191, 36, 0.3);
}

.celebration-modal .btn-primary {
    margin-top: 0.5rem;
}

/* Timestamp display for gallery viewing */
.celebration-timestamp {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 110;
}

.celebration-timestamp.visible {
    opacity: 1;
}

/* Theme animations container - behind the card */
.theme-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Confetti container - in front on the card */
.confetti-container {
    position: absolute;
    top: 25px;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall 3s ease-in forwards;
}

/* Stars theme - fireworks */
.firework-rocket {
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 20px;
    border-radius: 2px;
    opacity: 0;
    animation: rocketLaunch 0.5s ease-out forwards;
}

@keyframes rocketLaunch {
    0% {
        bottom: 0;
        opacity: 1;
        height: 20px;
    }
    80% {
        opacity: 1;
    }
    100% {
        bottom: calc(100% - var(--end-y));
        opacity: 0;
        height: 35px;
    }
}

.firework-star {
    position: absolute;
    font-size: 1.4rem;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: starExplode 0.8s ease-out forwards;
}

@keyframes starExplode {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.2);
        opacity: 0;
    }
}

.firework-flash {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    opacity: 0;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: flashPop 0.4s ease-out forwards;
}

@keyframes flashPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
        filter: blur(0px);
    }
    50% {
        transform: translate(-50%, -50%) scale(3) rotate(20deg);
        opacity: 1;
        filter: blur(2px);
    }
    100% {
        transform: translate(-50%, -50%) scale(5) rotate(35deg);
        opacity: 0;
        filter: blur(4px);
    }
}

/* Gifts theme - falling presents */
.theme-gift,
.theme-coffee {
    position: absolute;
    top: -50px;
    opacity: 0;
    animation: smoothFall linear forwards;
}

@keyframes smoothFall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    5% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .wheel-container {
        max-height: 40vh;
    }

    .app-header h1 {
        font-size: 1.2rem;
    }

    .spin-btn {
        padding: 0.8rem 2rem;
        font-size: 1.2rem;
    }
}

/* Tablet and larger */
@media (min-width: 768px) {
    .wheel-container {
        width: 400px;
        height: 400px;
    }
}

/* ============================================
   Prize & Spinner Styles (v0.3.0)
   ============================================ */

/* Emoji Picker */
.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.emoji-btn {
    font-size: 1.5rem;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
}

.emoji-btn:hover {
    background: var(--surface-color);
    transform: scale(1.2);
}

.emoji-btn:active {
    transform: scale(0.95);
}

.emoji-btn.emoji-add {
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    font-size: 1.2rem;
    color: var(--text-muted);
}

.emoji-btn.emoji-add:hover {
    background: var(--primary-color);
    color: white;
    border-style: solid;
}

/* Prize input with line numbers */
.prize-input-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.line-numbers {
    background: var(--bg-color);
    color: var(--text-muted);
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    font-family: monospace;
    line-height: 1.5rem;
    text-align: right;
    user-select: none;
    border-right: 1px solid var(--border-color);
    min-width: 2.5rem;
}

.line-numbers span {
    display: block;
}

#prizesInput {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.5rem;
    resize: none;
    min-height: 100px;
}

#prizesInput:focus {
    outline: none;
}

#prizesInput::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.prize-buttons {
    display: flex;
    gap: 0.5rem;
}

.setting-hint {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Spinner Selector */
.spinner-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.spinner-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: var(--surface-color);
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.spinner-option:hover {
    border-color: var(--primary-color);
}

.spinner-option.selected {
    border-color: var(--gold-color);
    background: rgba(251, 191, 36, 0.15);
}

.spinner-option img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.spinner-option .no-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Featured Player Display (prize mode) */
.featured-player {
    display: none;
    position: fixed;
    top: calc(50% - min(45vw, 25vh, 200px) - 120px);
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.featured-player.visible {
    display: flex;
}

.featured-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--gold-color);
    overflow: hidden;
    background: var(--surface-color);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.featured-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-photo .featured-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.featured-name {
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: bold;
    color: var(--gold-color);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Slice Preview (shows when no hero/featured player) */
.slice-preview {
    display: none;
    position: fixed;
    top: calc(50% - min(45vw, 25vh, 200px) - 80px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
}

.slice-preview.visible {
    display: block;
}

.slice-preview-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

.slice-preview-text.waiting {
    color: var(--text-muted);
    font-style: italic;
    font-size: 1rem;
}

/* Hero Player Overlay (shows above wheel when spinner selected with players) */
.hero-player {
    display: none;
    position: fixed;
    top: calc(50% - min(45vw, 25vh, 200px) - 120px);
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    z-index: 2;
    max-width: 85vw;
}

.hero-player.visible {
    display: flex;
}

.hero-photo {
    width: 80px;
    height: 80px;
    min-width: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 4px solid var(--gold-color);
    overflow: hidden;
    background: var(--surface-color);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-photo .hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.hero-name {
    font-size: 0.75rem;
    color: var(--text-color);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.15rem;
    white-space: nowrap;
}

.hero-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold-color);
    text-shadow:
        0 0 8px rgba(251, 191, 36, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Arrow between hero and benefactor */
.hero-arrow {
    display: none;
    color: #ec4899;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0.8rem;
    text-shadow: 0 0 8px rgba(236, 72, 153, 0.6), 0 0 15px rgba(236, 72, 153, 0.4);
    align-self: center;
}

.hero-arrow.visible {
    display: block;
}

/* Benefactor (half size, right of hero) */
.benefactor {
    display: none;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.benefactor.visible {
    display: flex;
}

.benefactor-photo {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    overflow: hidden;
    background: var(--surface-color);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.benefactor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.benefactor-photo .benefactor-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
}

.benefactor-name {
    margin-top: 0.2rem;
    font-size: 0.65rem;
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Settings Row Layout */
.setting-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.stacked-checks {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stacked-checks label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-color);
    cursor: pointer;
}

.stacked-checks input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.setting-half {
    flex: 1;
}

.setting-third {
    flex: 1;
    min-width: 0;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-suffix input {
    flex: 1;
    min-width: 60px;
}

.input-suffix {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.theme-radios.compact {
    gap: 0.5rem;
    flex-wrap: wrap;
}

.theme-radios.compact label {
    gap: 0.2rem;
    font-size: 1rem;
}

.theme-radios.compact input[type="radio"] {
    width: 14px;
    height: 14px;
}


.db-row {
    display: flex;
    gap: 0.5rem;
}

.db-row input {
    flex: 1;
}

.db-row .btn-secondary {
    margin-top: 0;
    flex-shrink: 0;
}

.path-shortcuts {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

.path-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: monospace;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.path-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.config-toggle {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 0.2rem;
    margin-left: 0.3rem;
    transition: opacity 0.15s;
}

.config-toggle:hover {
    opacity: 1;
}

.db-config {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.db-config.hidden {
    display: none;
}

.shared-settings {
    padding-bottom: 0.75rem;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-hint,
.optional-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
}

.section-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Prize toggle */
.prize-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.prize-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Hero label input inline with prizes toggle */
.hero-label-input {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}

.hero-label-input label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: normal;
}

.hero-label-input input {
    width: 80px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
}

.hero-label-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Hero multi toggle */
.hero-multi-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hero-multi-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.hero-multi-toggle span {
    font-weight: normal;
}

.prizes-content {
    transition: opacity 0.2s ease;
}

.prizes-content.disabled {
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

.inline-checks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.inline-checks label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Theme radio buttons */
.theme-radios {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.theme-radios label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-color);
    cursor: pointer;
}

.theme-radios input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}


/* Twemoji in spinner/featured elements */
.spinner-option img.emoji,
.featured-name img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 0.05em 0 0.1em;
    vertical-align: -0.1em;
}

/* Prize Presets */
.preset-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.preset-select {
    min-width: 100px;
    max-width: 140px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
}

.preset-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.preset-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 0.3rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon.btn-icon-danger:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Single button row (no reset) */
.button-row.single {
    justify-content: center;
}

.button-row.single .btn-primary {
    flex: none;
    min-width: 200px;
}

/* Input Modal */
/* Input and Confirm modals need higher z-index to appear above gallery */
.input-modal,
.confirm-modal {
    z-index: 200;
}

.input-modal .input-modal-content,
.confirm-modal .confirm-modal-content {
    background: var(--surface-color);
    border-radius: 16px;
    max-width: 340px;
    width: 90%;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.input-modal-header,
.confirm-modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.input-modal-header h3,
.confirm-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.input-modal-body,
.confirm-modal-body {
    padding: 1.25rem;
}

.input-modal-body input {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 1rem;
}

.input-modal-body input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.confirm-modal-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.input-modal-buttons,
.confirm-modal-buttons {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.input-modal-buttons button,
.confirm-modal-buttons button {
    flex: 1;
    padding: 0.75rem 1rem;
    margin: 0;
}

/* ============================================
   Winners Gallery - NetDynamic.Net
   ============================================ */

.gallery-modal {
    background: rgba(0, 0, 0, 0.95);
}

.gallery-content {
    background: var(--surface-color);
    border-radius: 16px;
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    overflow: hidden;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    flex-shrink: 0;
}

.gallery-header h2 {
    font-size: 1rem;
    color: var(--gold-color);
    margin: 0;
    line-height: 1.2;
}

.gallery-header .close-btn {
    font-size: 1.5rem;
    padding: 0 0.4rem;
    line-height: 1;
}

.gallery-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-color);
}

.gallery-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.gallery-grid {
    display: grid;
    gap: 0.75rem;
    justify-content: center;
    grid-template-columns: repeat(3, 110px);
}

/* Responsive grid - max 3 columns, vertical scroll */
.gallery-grid.cards-1 { grid-template-columns: 110px; }
.gallery-grid.cards-2 { grid-template-columns: repeat(2, 110px); }

/* Mini winner wrapper with plaque */
.mini-winner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    width: 100%;
}

.mini-card-plaque {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--gold-color);
    font-size: 0.55rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--gold-color);
    margin-bottom: 4px;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Mini winner card for gallery */
.mini-winner-card {
    position: relative;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 10px;
    padding: 6px;
    border: 2px solid var(--gold-color);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2), 0 4px 15px rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mini-winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg, transparent 0%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.05) 70%, transparent 100%);
    border-radius: 8px;
    pointer-events: none;
    z-index: 0;
}

.mini-card-inner {
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    border-radius: 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.2);
    position: relative;
    z-index: 1;
}

.mini-card-photo {
    flex: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #4a4a6a 0%, #2a2a4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mini-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-card-photo .mini-photo-placeholder {
    font-size: 2rem;
    color: var(--text-muted);
}

/* Hero badge in corner of gallery card */
.hero-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    border: 2px solid var(--gold-color);
    overflow: visible;
    background: var(--surface-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: conic-gradient(
        from 325deg,
        transparent 0deg,
        transparent 300deg,
        rgba(255, 255, 255, 0.4) 330deg,
        rgba(255, 255, 255, 0.6) 345deg,
        rgba(255, 255, 255, 0.4) 360deg
    );
    animation: heroGlow 2.5s ease-in-out infinite;
    z-index: -1;
    filter: blur(1px);
}

@keyframes heroGlow {
    0% { transform: rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    40% { transform: rotate(180deg); opacity: 1; }
    50% { transform: rotate(180deg); opacity: 0; }
    100% { transform: rotate(0deg); opacity: 0; }
}

.hero-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-badge span {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mini-card-info {
    padding: 4px 6px;
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, transparent 100%);
    border-top: 1px solid rgba(251, 191, 36, 0.2);
    text-align: center;
}

.mini-card-name {
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--gold-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mini-card-prize {
    font-size: 0.65rem;
    color: var(--text-muted);
    overflow: hidden;
    margin-top: 1px;
}

.mini-card-stars {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    z-index: 10;
}

/* Hold to delete feature */
.mini-card-delete-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 0.5rem;
    text-align: center;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 0 0 8px 8px;
    z-index: 5;
}

.mini-winner-card.holding .mini-card-delete-hint {
    opacity: 1;
}

.mini-winner-card.holding {
    animation: holdShake 0.1s ease-in-out infinite;
    border-color: var(--danger-color);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5), 0 4px 15px rgba(0, 0, 0, 0.4);
}

.mini-winner-card.deleting {
    animation: deleteCard 0.3s ease-out forwards;
}

@keyframes holdShake {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

@keyframes deleteCard {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5); opacity: 0; }
}

.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
    flex-shrink: 0;
}

.gallery-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Day reset select styling */
#dayResetHour,
#dayResetTimezone {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: var(--text-color);
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
}

#dayResetHour:focus,
#dayResetTimezone:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Responsive adjustments for gallery */
@media (min-width: 480px) {
    .gallery-content {
        max-width: 400px;
        max-height: 90vh;
        width: auto;
        height: auto;
    }

    .mini-winner-card {
        padding: 8px;
    }

    .mini-card-name {
        font-size: 0.75rem;
    }

    .mini-card-prize {
        font-size: 0.7rem;
    }
}
