/* Coin flip generator specific styles */

.coin-prompt {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Coin container */
.coin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    margin: 2rem 0;
    perspective: 1000px;
}

/* The coin itself */
.coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
    cursor: pointer;
}

/* Coin sides */
.coin-side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    border: 8px solid #fbbf24;
    box-shadow: 
        0 0 20px rgba(251, 191, 36, 0.3),
        inset 0 0 20px rgba(0,0,0,0.1);
    font-weight: bold;
}

/* Krona side (heads) */
.coin-side.krona {
    background: linear-gradient(135deg, #fef3c7, #fcd34d, #f59e0b);
    color: #92400e;
    transform: rotateY(0deg);
}

.coin-side.krona .crown {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Klave side (tails) */
.coin-side.klave {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db, #9ca3af);
    color: #374151;
    transform: rotateY(180deg);
}

.coin-side.klave .number {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

/* Flip animations */
.coin.flipping {
    animation: coinFlip 3s ease-out forwards;
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(450deg) rotateX(180deg) scale(1.1); }
    50% { transform: rotateY(900deg) rotateX(360deg) scale(0.9); }
    75% { transform: rotateY(1350deg) rotateX(540deg) scale(1.05); }
    100% { transform: rotateY(1800deg) rotateX(720deg) scale(1); }
}

/* Krona result animation */
.coin.result-krona {
    animation: landKrona 1s ease-out forwards;
}

@keyframes landKrona {
    0% { transform: rotateY(1800deg) rotateX(720deg); }
    100% { transform: rotateY(0deg) rotateX(0deg); }
}

/* Klave result animation */
.coin.result-klave {
    animation: landKlave 1s ease-out forwards;
}

@keyframes landKlave {
    0% { transform: rotateY(1800deg) rotateX(720deg); }
    100% { transform: rotateY(180deg) rotateX(0deg); }
}

/* Coin flip button */
.coin-flip-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
    border: 3px solid #d97706;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin: 2rem 0;
    transform: scale(1.05);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.3);
}

.coin-flip-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 35px rgba(251, 191, 36, 0.4);
}

.coin-flip-btn:disabled {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #6b7280;
    border-color: #9ca3af;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

/* Result display */
.coin-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 20px;
    transition: all 0.5s ease;
    min-height: 120px;
}

.coin-result.krona-win {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    border: 3px solid #f59e0b;
    color: #92400e;
    animation: celebrateKrona 0.8s ease-out;
}

.coin-result.klave-win {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: 3px solid #6b7280;
    color: #374151;
    animation: celebrateKlave 0.8s ease-out;
}

.result-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounceResult 0.6s ease-out;
}

.result-text {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.result-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Copy button for coin result */
.coin-copy-btn {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    border: 2px solid currentColor;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.coin-copy-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Tips section */
.tips-section {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 15px;
    border-left: 4px solid #3b82f6;
}

.tips-section h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tips-section ul {
    list-style: none;
    padding: 0;
}

.tips-section li {
    padding: 0.5rem 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.tips-section li::before {
    content: '•';
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Celebration animations */
@keyframes celebrateKrona {
    0% { transform: scale(0.8) rotate(-3deg); opacity: 0; }
    50% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes celebrateKlave {
    0% { transform: scale(0.8) rotate(3deg); opacity: 0; }
    50% { transform: scale(1.05) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bounceResult {
    0% { transform: scale(0) rotate(180deg); }
    50% { transform: scale(1.2) rotate(20deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Coin hover effect */
.coin:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .coin {
        width: 120px;
        height: 120px;
    }
    
    .coin-side.krona .crown {
        font-size: 2.5rem;
    }
    
    .coin-side.klave .number {
        font-size: 3rem;
    }
    
    .coin-text {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .result-text {
        font-size: 1.5rem;
    }
    
    .result-emoji {
        font-size: 2.5rem;
    }
    
    .tips-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .coin {
        width: 100px;
        height: 100px;
    }
    
    .coin-container {
        height: 150px;
    }
    
    .coin-side.krona .crown {
        font-size: 2rem;
    }
    
    .coin-side.klave .number {
        font-size: 2.5rem;
    }
}