/* Enhanced Photo Spinner Styles - Vintage & Modern Mix */
.photo-spinner-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

/* Background Effects - More Subtle/Classic */
.spinner-section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, 
        rgba(50, 30, 20, 0.4) 0%, 
        rgb(15, 15, 15) 80%);
}

.cosmic-particles {
    /* Changed to subtle dust motes */
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(212,175,55,0.5), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(212,175,55,0.5), transparent);
    background-repeat: repeat;
    background-size: 300px 300px;
    animation: cosmicFloat 40s linear infinite;
    opacity: 0.4;
}

.golden-rays {
    /* Simplified to a classic spotlight effect */
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(212,175,55,0.1), transparent 60%);
    animation: none; /* No rotation, just static light */
    opacity: 0.5;
}

/* Main Content Container - Horizontal Layout */
.spinner-layout-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 2;
    padding: 0 20px;
}

.spinner-wheel-column {
    flex: 0 0 auto;
}

.spinner-info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align left */
    gap: 2rem;
    max-width: 500px;
}

/* Enhanced Spinner Wheel - Smaller Size */
.spinner-wheel {
    position: relative;
    width: 320px; /* Reduced from 450px */
    height: 320px; /* Reduced from 450px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #222; /* Dark reel center */
    border: 4px solid #444;
}

/* Wheel Rings */
.wheel-outer-ring {
    pointer-events: none; /* Add this to allow clicks through */
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 15px dashed #555; /* Film Reel holes look */
    box-shadow: inset 0 0 20px #000;
    animation: rotate 20s linear infinite;
}

.wheel-middle-ring {
    pointer-events: none; /* Add this to allow clicks through */
    position: absolute;
    width: 85%;
    height: 85%;
    border-radius: 50%;    border: 4px solid rgba(212,175,55,0.6);
    animation: rotate -10s linear infinite;
}

.wheel-inner-glow {
    pointer-events: none; /* Add this to allow clicks through */
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255,215,0,0.2) 0%, 
        rgba(212,175,55,0.1) 50%, 
        transparent 100%);
    animation: pulse 3s ease-in-out infinite;
}

/* Enhanced Spin Button */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100 !important; /* Force high z-index */
    pointer-events: auto;
}

.spin-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #D4AF37);
    color: #1a0f08;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    box-shadow: 
        0 10px 30px rgba(212,175,55,0.4),
        inset 0 2px 10px rgba(255,255,255,0.3),
        inset 0 -2px 10px rgba(0,0,0,0.2);
    overflow: hidden;
}

.spin-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 15px 40px rgba(212,175,55,0.6),
        inset 0 2px 15px rgba(255,255,255,0.4),
        inset 0 -2px 15px rgba(0,0,0,0.3);
}

.spin-button:active {
    transform: scale(0.95);
}

.spin-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.4) 0%, transparent 70%);
    animation: spinGlow 2s ease-in-out infinite;
    z-index: -1;
}

.spin-icon {
    font-size: 1.8rem;
    animation: bounce 2s infinite;
}

.spin-text {
    font-size: 1rem;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Photo Positioning on Wheel */
.wheel-photos {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.wheel-photo {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #D4AF37;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    transform-origin: center;
}

.wheel-photo:hover {
    transform: scale(1.2);
    border-color: #FFD700;
    box-shadow: 0 8px 25px rgba(212,175,55,0.5);
}

.wheel-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wheel-photo:hover img {
    transform: scale(1.1);
}

/* Enhanced Wheel Pointer */
.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pointer-arrow {
    font-size: 2rem;
    color: #D4AF37;
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.5),
        0 0 20px rgba(212,175,55,0.6);
    animation: pointerBounce 2s infinite;
}

.pointer-glow {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(212,175,55,0.8) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: -10px;
    animation: pulse 2s infinite;
}

/* Instructions Section */
.spinner-instructions {
    text-align: left; /* Align left for side column */
    color: #F4E4BC;
    max-width: 100%;
}

.spinner-instructions h4 {
    color: #D4AF37;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.spinner-instructions p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Enhanced Result Section */
.spinner-result {
    margin-top: 0; /* Removed top margin */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.result-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center result inside column */
    gap: 1.5rem;
    width: 100%;
}

.selected-photo-frame {
    position: relative;
    min-width: 300px;
    min-height: 200px;
    background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(139,69,19,0.1));
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.5s ease;
}

/* Photo Border with Ornaments */
.photo-border {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(212,175,55,0.6);
    border-radius: 10px;
    pointer-events: none;
}

.corner-ornament {
    position: absolute;
    font-size: 1.2rem;
    color: #D4AF37;
    text-shadow: 0 0 10px rgba(212,175,55,0.5);
}

.corner-ornament.top-left { top: -8px; left: -8px; }
.corner-ornament.top-right { top: -8px; right: -8px; }
.corner-ornament.bottom-left { bottom: -8px; left: -8px; }
.corner-ornament.bottom-right { bottom: -8px; right: -8px; }

/* Result Image */
#resultImg {
    max-width: 250px;
    max-height: 180px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transition: all 0.5s ease;
}

#resultImg:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(212,175,55,0.3);
}

/* Photo Title */
.photo-title {
    color: #D4AF37;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    max-width: 280px;
    line-height: 1.4;
}

/* Result Sparkles */
.result-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 15px;
}

.sparkle {
    position: absolute;
    font-size: 1.2rem;
    animation: sparkleFloat 4s infinite linear;
    opacity: 0;
}

.sparkle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 30%; right: 15%; animation-delay: 1s; }
.sparkle:nth-child(3) { bottom: 25%; left: 20%; animation-delay: 2s; }
.sparkle:nth-child(4) { bottom: 15%; right: 10%; animation-delay: 3s; }

/* Collection Preview */
.collection-preview {
    text-align: center;
    background: rgba(212,175,55,0.1);
    padding: 1rem 2rem;
    border-radius: 25px;
    border: 1px solid rgba(212,175,55,0.3);
    min-width: 300px;
}

.collection-preview h5 {
    color: #D4AF37;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.preview-count {
    color: #F4E4BC;
    font-size: 0.95rem;
}

#photoCount {
    color: #FFD700;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Spinning Animation */
.wheel-photos.spinning {
    animation: spinWheel 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Keyframe Animations */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes cosmicFloat {
    0% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-10px) translateX(5px); }
    66% { transform: translateY(5px) translateX(-5px); }
    100% { transform: translateY(0px) translateX(0px); }
}

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

@keyframes spinGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

@keyframes sparkleFloat {
    0% { opacity: 0; transform: translateY(0) scale(0.8); }
    50% { opacity: 1; transform: translateY(-20px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-40px) scale(0.8); }
}

@keyframes spinWheel {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(var(--spin-angle, 1080deg)); }
}

/* Responsive Design */
@media (max-width: 900px) {
    .spinner-layout-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .spinner-info-column {
        align-items: center;
        width: 100%;
    }
    
    .spinner-instructions {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .spinner-wheel {
        width: 300px; /* Reduced responsive size */
        height: 300px;
    }
    
    .spin-button {
        width: 90px;
        height: 90px;
        font-size: 0.9rem;
    }
    
    .wheel-photo {
        width: 45px;
        height: 45px;
    }
    
    .selected-photo-frame {
        min-width: 280px;
        padding: 1.5rem;
    }
    
    #resultImg {
        max-width: 200px;
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .spinner-wheel {
        width: 260px; /* Further reduced */
        height: 260px;
    }
    
    .spin-button {
        width: 80px;
        height: 80px;
        font-size: 0.8rem;
    }
    
    .wheel-photo {
        width: 35px;
        height: 35px;
    }
    
    .selected-photo-frame {
        min-width: 250px;
        padding: 1rem;
    }
}

/* Success Animation for Selected Photo */
.selected-photo-frame.success {
    border: 3px solid #32CD32;
    background: linear-gradient(45deg, rgba(50,205,50,0.1), rgba(212,175,55,0.1));
    box-shadow: 
        0 15px 35px rgba(50,205,50,0.3),
        0 0 30px rgba(255,215,0,0.2);
}

.selected-photo-frame.success .corner-ornament {
    color: #32CD32;
    animation: successGlow 1s ease-in-out;
}

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