/* Sidebar layout inherited from shared-sidebar-layout.css */

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    min-height: 100vh;
    color: #fff;
}

.section-header {
    font-size: 0.66rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Score Board in Sidebar */
.score-board {
    background: #F5F5F5;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #FFFFFF;
    border-radius: 8px;
}

.score-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333333;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #832EC5;
}

/* Coin Count Control in Sidebar */
.coin-count-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Reset Button - Danger/Destructive Style */
.reset-button {
    width: 100%;
    background: #FFFFFF;
    border: 2px solid #EF4444;
    color: #333333;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reset-button:hover:not(:disabled) {
    background: #FEF2F2;
    transform: translateY(-1px);
}

.reset-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: #E0E0E0;
    margin: 8px 0;
}

/* Main content layout inherited from shared-sidebar-layout.css */
.main-content {
    flex: 1;
    justify-content: center;
    align-items: center;
    padding: clamp(24px, 4vw, 64px);
    position: relative;
}

.game-container {
    text-align: center;
    max-width: 90vw;
    width: 100%;
    z-index: 1;
    position: relative;
}

.coins-display {
    position: relative;
    margin-bottom: 32px;
    min-height: 200px;
    height: calc(100vh - 280px);
    max-height: none;
    perspective: 1500px;
    overflow: hidden;
}

.coin-wrapper {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.4s ease, left 0.4s ease, top 0.4s ease, opacity 0.4s ease;
}

.coin-wrapper.no-transition {
    transition: none;
}

.coin-container {
    position: relative;
    transform-style: preserve-3d;
    transition: width 0.4s ease, height 0.4s ease;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.coin-side {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 50%, #a8a8a8 100%);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35),
        inset 0 3px 10px rgba(255, 255, 255, 0.3),
        inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    border: 8px solid #b8b8b8;
}

.heads {
    transform: rotateY(0deg);
}

.tails {
    transform: rotateY(180deg);
}

.coin-face-content {
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f0f0f0, #c0c0c0);
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.coin-face-content img {
    width: 75%;
    height: 75%;
    object-fit: cover;
    border-radius: 50%;
}

.coin-result-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #FFC700;
    min-height: 22px;
}

.result-text {
    font-size: clamp(1.5rem, calc(1.5rem + 0.5vw), 2.5rem);
    font-weight: 700;
    margin: 24px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-height: 40px;
}

.flipping-text {
    font-size: clamp(1.25rem, calc(1.25rem + 0.4vw), 2rem);
    color: #FFC700;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.flip-button {
    background: linear-gradient(135deg, #B900FF 0%, #832EC5 100%);
    color: #FFFFFF;
    border: none;
    padding: 20px 64px;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 12px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 8px 24px rgba(131, 46, 197, 0.4);
}

.flip-button:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.flip-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Coin flip animations */
@keyframes flip-heads {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(720deg) rotateX(180deg); }
    50% { transform: rotateY(1440deg) rotateX(360deg); }
    75% { transform: rotateY(2160deg) rotateX(180deg); }
    100% { transform: rotateY(2880deg) rotateX(0deg); }
}

@keyframes flip-tails {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(720deg) rotateX(180deg); }
    50% { transform: rotateY(1440deg) rotateX(360deg); }
    75% { transform: rotateY(2160deg) rotateX(180deg); }
    100% { transform: rotateY(2880deg) rotateX(0deg) rotateY(180deg); }
}

@keyframes flip-heads-from-tails {
    0% { transform: rotateY(180deg) rotateX(0deg); }
    25% { transform: rotateY(900deg) rotateX(180deg); }
    50% { transform: rotateY(1620deg) rotateX(360deg); }
    75% { transform: rotateY(2340deg) rotateX(180deg); }
    100% { transform: rotateY(3060deg) rotateX(0deg); }
}

@keyframes flip-tails-from-tails {
    0% { transform: rotateY(180deg) rotateX(0deg); }
    25% { transform: rotateY(900deg) rotateX(180deg); }
    50% { transform: rotateY(1620deg) rotateX(360deg); }
    75% { transform: rotateY(2340deg) rotateX(180deg); }
    100% { transform: rotateY(3060deg) rotateX(0deg) rotateY(180deg); }
}

.flipping-heads {
    animation: flip-heads 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.flipping-tails {
    animation: flip-tails 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.flipping-heads-from-tails {
    animation: flip-heads-from-tails 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.flipping-tails-from-tails {
    animation: flip-tails-from-tails 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* Responsive - sidebar width breakpoints inherited from shared-sidebar-layout.css */
@media (max-width: 768px) {
    .sidebar-content {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
        gap: 12px;
    }

    .sidebar-section {
        flex: 1;
        min-width: 200px;
    }

    .sidebar-divider {
        display: none;
    }

    .main-content {
        padding: 24px;
    }

    .coin-container {
        width: 140px;
        height: 140px;
    }

    .flip-button {
        padding: 16px 48px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .coin-container {
        width: 100px;
        height: 100px;
    }

    .coins-display {
        gap: 16px;
    }

    .sidebar-section {
        min-width: 100%;
    }
}
