/* ========================================
   COIN FLIP - MAIN STYLES
   Version: 1.0
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.coin-flip-container {
    display: flex;
    gap: 30px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

/* ========================================
   LEFT SECTION - CONTROLS & STATS
   ======================================== */

.yes-no-h1{
    color:white !important;
}

.yes-no-h1-suite{
    color:#e74c3ce6 !important;
}

.left-section {
    flex: 1;
    min-width: 50%;
    max-width: 10%;
}

/* RESULTS BOXES */

.results {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.result-box {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-box:hover {
    transform: translateY(-5px);
}

.result-box span {
    font-size: 32px;
    display: block;
    margin-bottom: 5px;
}

.result-box p {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.heads-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tails-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* CONTROL PANEL */

.control-panel {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.control-panel h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
}

.flips-setting,
.speed-setting {
    margin-bottom: 20px;
}

.flips-setting label,
.speed-setting label {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

.input-sets {
    display: flex !important;
    gap: 8px;
    flex-wrap: wrap;
}

.setBtn,
.speedBtn {
    flex: 1;
    min-width: 50px;
    padding: 10px;
    border: 2px solid #ddd;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 13px;
}

.setBtn:hover,
.speedBtn:hover {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.setBtn.active,
.speedBtn.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.speed-buttons {
    display: flex;
    gap: 8px;
}

/* LIVE RESULTS */

.live-results {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
}

.live-results h4 {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.last-result-display {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    padding: 10px;
    background-color: #f0f4ff;
    border-radius: 5px;
}

.last-result-display.heads-result {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

.last-result-display.tails-result {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    color: #f5576c;
}

/* RESET BUTTON */

.reset-button {
    width: 100%;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.reset-button:hover {
    background-color: #c0392b;
    transform: scale(1.02);
}

.reset-button:active {
    transform: scale(0.98);
}

/* ========================================
   COIN SECTION - ANIMATION & FLIP
   ======================================== */

.coin-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

/* COIN CONTAINER */

.coin-container {
    perspective: 1000px;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-flip-container .coin {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

.coin:hover:not(.flipping) {
    transform: scale(1.05);
}

/* COIN FACES */

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    backface-visibility: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.coin-face.heads {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotateY(0deg);
}

.coin-face.tails {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: rotateY(180deg);
}

/* COIN ANIMATIONS */

.coin.flipping {
    animation: coinFlip 0.6s ease-in-out;
}

.coin.flipping.fast {
    animation: coinFlip 0.3s ease-in-out;
}

.coin.flipping.slow {
    animation: coinFlip 1s ease-in-out;
}

@keyframes coinFlip {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: rotateY(1800deg) rotateX(10deg);
    }
    100% {
        transform: rotateY(3600deg) rotateX(0deg);
    }
}

/* FLIP BUTTON */

.flip-button {
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.flip-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.flip-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.flip-button:active:not(:disabled) {
    transform: translateY(-1px);
}

/* FLIP STATUS */

.flip-status {
    font-size: 14px;
    color: #666;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN - TABLETS
   ======================================== */

@media (max-width: 768px) {
    .coin-flip-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    .left-section,
    .coin-section {
        max-width: 100%;
    }

    .coin-container {
        width: 200px;
        height: 200px;
    }

    .coin {
        width: 180px;
        height: 180px;
    }

    .coin-face {
        font-size: 32px;
    }

    .result-box span {
        font-size: 24px;
    }

    .result-box p {
        font-size: 12px;
    }

    .flip-button {
        padding: 12px 40px;
        font-size: 16px;
        width: 90%;
    }

    .results {
        gap: 10px;
    }

    .control-panel {
        padding: 15px;
    }

    .setBtn,
    .speedBtn {
        min-width: 45px;
        padding: 8px;
        font-size: 12px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

@media (max-width: 480px) {
    .coin-flip-container {
        padding: 10px;
        gap: 15px;
    }

    .coin-container {
        width: 150px;
        height: 150px;
    }

    .coin {
        width: 140px;
        height: 140px;
    }

    .coin-face {
        font-size: 24px;
    }

    .coin-face span {
        font-size: 18px;
    }

    .result-box span {
        font-size: 20px;
    }

    .result-box p {
        font-size: 11px;
    }

    .result-box {
        padding: 15px;
    }

    .flip-button {
        padding: 10px 30px;
        font-size: 14px;
        width: 100%;
    }

    .last-result-display {
        font-size: 18px;
    }

    .control-panel h3 {
        font-size: 16px;
    }

    .flips-setting label,
    .speed-setting label {
        font-size: 13px;
    }

    .setBtn,
    .speedBtn {
        min-width: 40px;
        padding: 6px;
        font-size: 11px;
    }

    .reset-button {
        padding: 10px;
        font-size: 13px;
    }
}

/* ========================================
   SMALL PHONES (Extra Small)
   ======================================== */

@media (max-width: 360px) {
    .coin-container {
        width: 120px;
        height: 120px;
    }

    .coin {
        width: 110px;
        height: 110px;
    }

    .coin-face {
        font-size: 18px;
    }

    .result-box span {
        font-size: 18px;
    }

    .flip-button {
        padding: 8px 20px;
        font-size: 12px;
    }

    .flip-status {
        font-size: 12px;
    }
}

/* ========================================
   ACCESSIBILITY - HIGH CONTRAST MODE
   ======================================== */

@media (prefers-contrast: more) {
    .result-box {
        border: 2px solid rgba(0, 0, 0, 0.2);
    }

    .flip-button {
        border: 2px solid rgba(0, 0, 0, 0.3);
    }

    .setBtn:focus,
    .speedBtn:focus,
    .flip-button:focus {
        outline: 3px solid #667eea;
        outline-offset: 2px;
    }
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .coin,
    .result-box,
    .flip-button,
    .setBtn,
    .speedBtn,
    .reset-button {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .flip-button,
    .reset-button,
    .control-panel {
        display: none;
    }

    .coin-flip-container {
        max-width: 100%;
    }

    .results {
        break-inside: avoid;
    }
}