/**
 * Gavehjulet - Giftfinder Styling
 * Koselig gavebutikk-stil med varme farger
 */

:root {
    --color-cream: #FFF8F0;
    --color-terracotta: #D87C5F;
    --color-terracotta-light: #E8A68A;
    --color-terracotta-dark: #B85A3F;
    --color-sage: #9CAF88;
    --color-sage-light: #B8D4A6;
    --color-brown: #6B4E3D;
    --color-brown-light: #8B6E5D;
    --color-white: #FFFFFF;
    --color-gray: #F5F5F5;
    --color-gray-dark: #E0E0E0;
    --shadow-soft: 0 4px 12px rgba(107, 78, 61, 0.1);
    --shadow-medium: 0 6px 20px rgba(107, 78, 61, 0.15);
    --border-radius: 16px;
    --border-radius-small: 8px;
}

/* Container */
.gavehjulet-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--color-white);
    min-height: 100vh;
}

/* Header */
.gavehjulet-header {
    position: sticky;
    top: 0;
    background: var(--color-white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.gavehjulet-logo {
    font-size: 40px;
    line-height: 1;
}

.gavehjulet-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-brown);
    margin: 0;
}

/* Seksjoner */
.gavehjulet-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-brown);
    margin: 0 0 20px 0;
}

.gavehjulet-lists {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

/* Filter-toggle knapp */
.filter-toggle-btn {
    width: 100%;
    padding: 16px 32px;
    border: 2px solid var(--color-white);
    border-radius: var(--border-radius-small);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--color-white);
    color: var(--color-terracotta);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.15);
}

.filter-toggle-btn:hover {
    transform: translateY(-2px);
    background: var(--color-white);
    color: var(--color-terracotta-dark);
    box-shadow: 0 6px 20px rgba(107, 78, 61, 0.2);
}

/* Filter-modal */
.filter-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

.filter-modal.active {
    display: block;
}

.filter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-modal.active .filter-modal-overlay {
    opacity: 1;
}

.filter-modal-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.filter-modal.active .filter-modal-content {
    transform: translateY(0);
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.filter-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--color-brown);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-modal-close:hover {
    background: var(--color-gray);
    color: var(--color-brown-dark);
}

.gavehjulet-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    padding: 0;
    border-radius: var(--border-radius);
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--color-brown);
    font-size: 14px;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--color-gray-dark);
    border-radius: var(--border-radius-small);
    font-size: 16px;
    background: var(--color-white);
    color: var(--color-brown);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-terracotta);
}

.filter-group-price,
.filter-group-categories,
.filter-group-age {
    grid-column: 1 / -1;
}

#age-display {
    color: var(--color-terracotta);
    font-weight: 600;
}

/* Category chips */
.filter-categories-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid var(--color-gray-dark);
    border-radius: 20px;
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--color-terracotta);
    transform: translateY(-2px);
}

.filter-chip input[type="checkbox"] {
    display: none;
}

.filter-chip input[type="checkbox"]:checked + .chip-label {
    color: var(--color-terracotta);
    font-weight: 600;
}

.filter-chip:has(input[type="checkbox"]:checked) {
    border-color: var(--color-terracotta);
    background: var(--color-white);
}

.chip-label {
    font-size: 14px;
    color: var(--color-brown);
    transition: all 0.3s ease;
}

.filter-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--color-gray-dark);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-terracotta);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-slider::-webkit-slider-thumb:hover {
    background: var(--color-terracotta-dark);
    transform: scale(1.1);
}

.filter-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-terracotta);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.filter-slider::-moz-range-thumb:hover {
    background: var(--color-terracotta-dark);
    transform: scale(1.1);
}

#price-display {
    color: var(--color-terracotta);
    font-weight: 600;
}

/* Knapper */
.gavehjulet-btn-primary,
.gavehjulet-btn-secondary {
    padding: 16px 32px;
    border: 2px solid var(--color-white);
    border-radius: var(--border-radius-small);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: var(--color-white);
}

.find-gift-button-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.gavehjulet-btn-primary {
    color: var(--color-terracotta);
    flex: 1;
    justify-content: center;
    font-size: 20px;
    padding: 20px;
    border: 2px solid var(--color-white);
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.15);
}

.sound-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    background: var(--color-white);
    color: var(--color-terracotta);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 78, 61, 0.15);
    flex-shrink: 0;
}

.sound-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 78, 61, 0.2);
}

.sound-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(107, 78, 61, 0.15);
}

.sound-toggle-btn.muted {
    opacity: 0.5;
}

.sound-toggle-btn.muted .sound-icon {
    opacity: 0.6;
}

.gavehjulet-btn-primary:hover {
    transform: translateY(-2px);
    background: var(--color-white);
    color: var(--color-terracotta-dark);
    box-shadow: 0 6px 20px rgba(107, 78, 61, 0.2);
}

.gavehjulet-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(107, 78, 61, 0.15);
}

.gavehjulet-btn-secondary {
    color: var(--color-sage);
    border: 2px solid var(--color-white);
}

.gavehjulet-btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-sage-light);
    transform: translateY(-2px);
}

/* Container for animasjon/resultat */
.button-animation-container {
    position: relative;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
    min-height: 400px;
}

.gavehjulet-btn-buy {
    padding: 16px 32px;
    border: 2px solid var(--color-white);
    border-radius: var(--border-radius-small);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    background: var(--color-white);
    color: var(--color-terracotta);
    flex: 1;
    min-width: 150px;
}

.gavehjulet-btn-buy:hover {
    transform: translateY(-2px);
    background: var(--color-white);
    color: var(--color-terracotta-dark);
}

.btn-emoji {
    font-size: 24px;
}

/* Gavekort */
.gift-card {
    background: var(--color-white);
    border: 2px solid var(--color-white);
    border-radius: var(--border-radius);
    padding: 50px 30px 30px 30px;
    text-align: center;
    animation: cardAppear 0.5s ease-out;
    pointer-events: auto;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.gift-save-btn-corner {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 8px 16px;
    border: 2px solid var(--color-white);
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-white);
    color: var(--color-sage);
    z-index: 20;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gift-save-btn-corner:hover {
    background: var(--color-white);
    color: var(--color-sage-light);
    transform: translateY(-2px);
}

.save-icon {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gift-image-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.gift-image {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gift-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-brown);
    margin: 0 0 10px 0;
}

.gift-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-terracotta);
    margin-bottom: 15px;
}

.gift-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 30px;
}

.gift-category-tag {
    background: var(--color-sage-light);
    color: var(--color-brown);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.gift-buy-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0px;
}

.gift-buy-container .gavehjulet-btn-buy {
    width: 100%;
    max-width: 250px;
}

.gift-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.gift-actions .gavehjulet-btn-secondary {
    max-width: 250px;
    width: 100%;
}

/* Lister */
.list-create {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.list-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid var(--color-gray-dark);
    border-radius: var(--border-radius-small);
    font-size: 16px;
}

.list-input:focus {
    outline: none;
    border-color: var(--color-terracotta);
}

.lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.list-item {
    background: var(--color-gray);
    border: 2px solid var(--color-gray-dark);
    border-radius: var(--border-radius-small);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item-name {
    font-weight: 600;
    color: var(--color-brown);
    font-size: 18px;
    margin: 0;
}

.list-item-count {
    color: var(--color-brown-light);
    font-size: 14px;
}

.list-item-actions {
    display: flex;
    gap: 10px;
}

.list-item-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--color-white);
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-white);
}

.list-item-btn-open {
    color: var(--color-terracotta);
    border: 2px solid var(--color-white);
}

.list-item-btn-open:hover {
    background: var(--color-white);
    color: var(--color-terracotta-dark);
}

.list-item-btn-delete {
    color: var(--color-brown);
    border: 2px solid var(--color-white);
}

.list-item-btn-delete:hover {
    background: var(--color-white);
    color: var(--color-brown-dark);
}

/* Slot machine animasjon - produkter byttes på samme sted */
.rulett-animation-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding: 0;
    border-radius: var(--border-radius);
    z-index: 10;
    pointer-events: none;
}

.rulett-wrapper {
    position: relative;
    width: 100%;
    min-height: 200px;
    border-radius: var(--border-radius-small);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 40px 40px;
}

.rulett-slot-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rulett-slot-item {
    text-align: center;
    animation: slotPulse 0.05s infinite;
    position: relative;
    z-index: 10;
    transition: opacity 0.8s ease;
    pointer-events: auto;
}

@keyframes slotPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

.rulett-item-image-container {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.rulett-item-image {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.rulett-item-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-brown);
    margin: 0;
}

/* Røyk-effekt med keyframes - masse gråhvit røyk */
.smoke-effect {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 30;
    opacity: 0;
}

.smoke-effect.active {
    opacity: 1;
}

@keyframes smokeFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.smoke {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, 
        rgba(240, 240, 240, 1) 0%,
        rgba(235, 235, 235, 0.95) 5%,
        rgba(230, 230, 230, 0.9) 10%,
        rgba(225, 225, 225, 0.85) 15%,
        rgba(220, 220, 220, 0.8) 20%,
        rgba(215, 215, 215, 0.75) 25%,
        rgba(210, 210, 210, 0.7) 30%,
        rgba(205, 205, 205, 0.65) 35%,
        rgba(200, 200, 200, 0.6) 40%,
        rgba(195, 195, 195, 0.5) 45%,
        rgba(190, 190, 190, 0.4) 50%,
        rgba(185, 185, 185, 0.3) 60%,
        rgba(180, 180, 180, 0.2) 70%,
        rgba(175, 175, 175, 0.1) 80%,
        transparent 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    filter: blur(16px);
    will-change: transform, opacity;
}

/* Start animasjoner når containeren er aktiv - kortere varighet */
.smoke-effect.active .smoke-1 {
    animation: smokePuff1 0.5s cubic-bezier(0.05, 0, 0.05, 1) forwards;
}

.smoke-effect.active .smoke-2 {
    animation: smokePuff2 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.05s forwards;
}

.smoke-effect.active .smoke-3 {
    animation: smokePuff3 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.1s forwards;
}

.smoke-effect.active .smoke-4 {
    animation: smokePuff4 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.15s forwards;
}

.smoke-effect.active .smoke-5 {
    animation: smokePuff5 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.2s forwards;
}

.smoke-effect.active .smoke-6 {
    animation: smokePuff6 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.08s forwards;
}

.smoke-effect.active .smoke-7 {
    animation: smokePuff7 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.12s forwards;
}

.smoke-effect.active .smoke-8 {
    animation: smokePuff8 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.18s forwards;
}

.smoke-effect.active .smoke-9 {
    animation: smokePuff9 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.03s forwards;
}

.smoke-effect.active .smoke-10 {
    animation: smokePuff10 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.22s forwards;
}

.smoke-effect.active .smoke-11 {
    animation: smokePuff11 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.07s forwards;
}

.smoke-effect.active .smoke-12 {
    animation: smokePuff12 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.25s forwards;
}

.smoke-effect.active .smoke-13 {
    animation: smokePuff13 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.14s forwards;
}

.smoke-effect.active .smoke-14 {
    animation: smokePuff14 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.09s forwards;
}

.smoke-effect.active .smoke-15 {
    animation: smokePuff15 0.5s cubic-bezier(0.05, 0, 0.05, 1) 0.16s forwards;
}

@keyframes smokePuff1 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.7) rotate(12deg);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(25deg);
    }
    60% {
        opacity: 0.8;
        transform: translate(-80px, -140px) scale(2.2) rotate(60deg);
    }
    100% {
        transform: translate(-130px, -200px) scale(3.8) rotate(110deg);
        opacity: 0;
    }
}

@keyframes smokePuff2 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.7) rotate(-12deg);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1) rotate(-25deg);
    }
    60% {
        opacity: 0.8;
        transform: translate(80px, -140px) scale(2.2) rotate(-60deg);
    }
    100% {
        transform: translate(130px, -200px) scale(3.8) rotate(-110deg);
        opacity: 0;
    }
}

@keyframes smokePuff3 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8) rotate(18deg);
    }
    35% {
        opacity: 0.95;
        transform: translate(-160px, -100px) scale(2.4) rotate(75deg);
    }
    100% {
        transform: translate(-200px, -160px) scale(4.2) rotate(140deg);
        opacity: 0;
    }
}

@keyframes smokePuff4 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8) rotate(-18deg);
    }
    35% {
        opacity: 0.95;
        transform: translate(160px, -100px) scale(2.4) rotate(-75deg);
    }
    100% {
        transform: translate(200px, -160px) scale(4.2) rotate(-140deg);
        opacity: 0;
    }
}

@keyframes smokePuff5 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.9) rotate(8deg);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.4) rotate(15deg);
    }
    65% {
        opacity: 0.85;
        transform: translate(10px, -180px) scale(2.7) rotate(35deg);
    }
    100% {
        transform: translate(30px, -250px) scale(4.8) rotate(55deg);
        opacity: 0;
    }
}

@keyframes smokePuff6 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    9% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.6) rotate(-8deg);
    }
    40% {
        opacity: 0.9;
        transform: translate(-100px, -120px) scale(2) rotate(-40deg);
    }
    100% {
        transform: translate(-150px, -190px) scale(3.5) rotate(-85deg);
        opacity: 0;
    }
}

@keyframes smokePuff7 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    9% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.6) rotate(8deg);
    }
    40% {
        opacity: 0.9;
        transform: translate(100px, -120px) scale(2) rotate(40deg);
    }
    100% {
        transform: translate(150px, -190px) scale(3.5) rotate(85deg);
        opacity: 0;
    }
}

@keyframes smokePuff8 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.75) rotate(-10deg);
    }
    45% {
        opacity: 0.95;
        transform: translate(-30px, -130px) scale(1.8) rotate(-30deg);
    }
    100% {
        transform: translate(-50px, -200px) scale(3.3) rotate(-65deg);
        opacity: 0;
    }
}

@keyframes smokePuff9 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    6% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.65) rotate(15deg);
    }
    32% {
        opacity: 0.98;
        transform: translate(-120px, -90px) scale(2.1) rotate(50deg);
    }
    100% {
        transform: translate(-170px, -150px) scale(4) rotate(100deg);
        opacity: 0;
    }
}

@keyframes smokePuff10 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8) rotate(-14deg);
    }
    35% {
        opacity: 0.95;
        transform: translate(120px, -110px) scale(2.2) rotate(-55deg);
    }
    100% {
        transform: translate(170px, -170px) scale(3.8) rotate(-105deg);
        opacity: 0;
    }
}

@keyframes smokePuff11 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    7% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.7) rotate(6deg);
    }
    38% {
        opacity: 0.92;
        transform: translate(-70px, -115px) scale(1.9) rotate(35deg);
    }
    100% {
        transform: translate(-110px, -175px) scale(3.3) rotate(75deg);
        opacity: 0;
    }
}

@keyframes smokePuff12 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    9% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.75) rotate(-6deg);
    }
    37% {
        opacity: 0.95;
        transform: translate(70px, -115px) scale(1.9) rotate(-35deg);
    }
    100% {
        transform: translate(110px, -175px) scale(3.3) rotate(-75deg);
        opacity: 0;
    }
}

@keyframes smokePuff13 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.68) rotate(20deg);
    }
    42% {
        opacity: 0.9;
        transform: translate(-140px, -85px) scale(2.3) rotate(65deg);
    }
    100% {
        transform: translate(-190px, -145px) scale(4.1) rotate(115deg);
        opacity: 0;
    }
}

@keyframes smokePuff14 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.72) rotate(-20deg);
    }
    40% {
        opacity: 0.93;
        transform: translate(140px, -85px) scale(2.3) rotate(-65deg);
    }
    100% {
        transform: translate(190px, -145px) scale(4.1) rotate(-115deg);
        opacity: 0;
    }
}

@keyframes smokePuff15 {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    7% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.82) rotate(3deg);
    }
    34% {
        opacity: 0.96;
        transform: translate(-10px, -125px) scale(2) rotate(22deg);
    }
    100% {
        transform: translate(15px, -195px) scale(3.6) rotate(42deg);
        opacity: 0;
    }
}

/* Modal */
.list-modal,
.list-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(107, 78, 61, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.list-modal-content,
.list-view-modal-content {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.list-modal-content h3,
.list-view-header h3 {
    margin: 0 0 20px 0;
    color: var(--color-brown);
    font-size: 24px;
}

.list-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-gray-dark);
}

.list-view-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--color-brown);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.list-view-close:hover {
    background: var(--color-gray);
    color: var(--color-terracotta);
}

.list-modal-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.list-modal-option {
    padding: 15px;
    background: var(--color-gray);
    border: 2px solid var(--color-gray-dark);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--color-brown);
}

.list-modal-option:hover {
    background: var(--color-terracotta-light);
    border-color: var(--color-terracotta);
    color: var(--color-white);
}

.list-view-items {
    display: grid;
    gap: 15px;
}

.list-view-item {
    background: var(--color-cream);
    border: 2px solid var(--color-gray-dark);
    border-radius: var(--border-radius-small);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.list-view-item-emoji {
    font-size: 40px;
    line-height: 1;
}

.list-view-item-info {
    flex: 1;
}

.list-view-item-title {
    font-weight: 600;
    color: var(--color-brown);
    margin: 0 0 5px 0;
    font-size: 18px;
}

.list-view-item-price {
    color: var(--color-terracotta);
    font-weight: 600;
    font-size: 16px;
}

/* Responsivt design - Mobilvennlig */
@media (max-width: 768px) {
    .gavehjulet-container {
        padding: 15px;
    }
    
    .gavehjulet-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .gavehjulet-title {
        font-size: 20px;
    }
    
    .gavehjulet-filters,
    .gavehjulet-result,
    .gavehjulet-lists {
        padding: 20px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .gift-card {
        padding: 30px 20px;
    }
    
    .gift-image {
        max-height: 150px;
    }
    
    .gift-image-container {
        min-height: 150px;
    }
    
    .gift-title {
        font-size: 24px;
    }
    
    .gift-actions {
        flex-direction: column;
    }
    
    .gift-actions .gavehjulet-btn-secondary {
        width: 100%;
    }
    
    .list-create {
        flex-direction: column;
    }
    
    .list-input {
        width: 100%;
    }
    
    .lists-container {
        grid-template-columns: 1fr;
    }
    
    .rulett-wrapper {
        min-height: 150px;
        padding: 30px 20px;
    }
    
    .rulett-item-image {
        max-height: 150px;
    }
    
    .rulett-item-image-container {
        min-height: 150px;
    }
    
    .smoke-effect {
        width: 350px;
        height: 350px;
    }
    
    .smoke {
        width: 90px;
        height: 90px;
        filter: blur(12px);
    }
}

/* Feilmelding */
.gavehjulet-error {
    background: #FFE5E5;
    border: 2px solid #FF6B6B;
    border-radius: var(--border-radius-small);
    padding: 20px;
    color: #C92A2A;
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
}

/* Loading */
.gavehjulet-loading {
    text-align: center;
    padding: 40px;
    color: var(--color-brown);
    font-size: 18px;
}

/* Konfetti-effekt */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color-terracotta);
    opacity: 0;
}

.confetti.confetti-1 { background: var(--color-terracotta); }
.confetti.confetti-2 { background: var(--color-sage); }
.confetti.confetti-3 { background: #FFD700; }
.confetti.confetti-4 { background: #FF6B9D; }
.confetti.confetti-5 { background: #4ECDC4; }
.confetti.confetti-6 { background: #95E1D3; }
.confetti.confetti-7 { background: #F38181; }
.confetti.confetti-8 { background: #AA96DA; }

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(calc(100vh - var(--confetti-start-y, 0px))) translateX(calc(var(--confetti-x, 0px))) rotate(360deg);
    }
}

.confetti.animate {
    animation: confettiFall var(--confetti-duration, 3s) ease-in forwards;
}

