/* assets/css/generators/coin-flip.css */

.coin-flip-page {
    padding: 2rem 0;
}

/* Remove local page-header styles - now using global from main.css */

.generator-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.coin-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 500px;
}

.coin-container {
    position: relative;
    perspective: 1000px;
    margin-bottom: 2rem;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.coin {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 8px solid #ffd700;
    backface-visibility: hidden;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd700, #ffed4a);
}

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

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

.coin-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    border-radius: 50%;
    background: transparent;
}

.coin-symbol {
    display: block;
    font-size: 4rem;
    line-height: 1;
}

.coin.coin-type-dollar .coin-image,
.coin.coin-type-euro .coin-image,
.coin.coin-type-bitcoin .coin-image,
.coin.coin-type-gbp .coin-image,
.coin.coin-type-ruble .coin-image,
.coin.coin-type-hryvnia .coin-image {
    display: block;
}

.coin.coin-type-dollar .coin-symbol,
.coin.coin-type-euro .coin-symbol,
.coin.coin-type-bitcoin .coin-symbol,
.coin.coin-type-gbp .coin-symbol,
.coin.coin-type-ruble .coin-symbol,
.coin.coin-type-hryvnia .coin-symbol {
    display: none;
}

.coin.coin-type-dollar .coin-face,
.coin.coin-type-euro .coin-face,
.coin.coin-type-bitcoin .coin-face,
.coin.coin-type-gbp .coin-face,
.coin.coin-type-ruble .coin-face,
.coin.coin-type-hryvnia .coin-face {
    background: transparent;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.coin.coin-type-emoji .coin-face {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    border-color: #4ECDC4;
}

.coin.coin-type-simple .coin-face {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    font-size: 5rem;
    font-weight: 900;
    color: white;
}

.coin.flipping {
    animation: coinFlip 1s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes coinFlip {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(450deg) rotateX(180deg) translateY(-30px); }
    50% { transform: rotateY(900deg) rotateX(360deg) translateY(-50px); }
    75% { transform: rotateY(1350deg) rotateX(540deg) translateY(-30px); }
    100% { transform: rotateY(1800deg) rotateX(720deg); }
}

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

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

.result-display {
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
}

.single-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.result-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    width: 100%;
    word-wrap: break-word;
}

.result-symbol {
    font-size: 3rem;
    animation: resultPulse 0.5s ease-in-out;
}

@keyframes resultPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.multiple-results {
    width: 100%;
    max-width: 400px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--border-radius);
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    min-height: 60px;
}

.result-item:hover {
    transform: scale(1.05);
}

.result-item-symbol {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.result-item-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 0.25rem;
}

.result-item-number {
    font-size: 0.75rem;
    color: #666;
}

.flip-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    font-size: 1.25rem;
    padding: 1rem 3rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    min-width: 200px;
}

.flip-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

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

.settings-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    background: var(--light);
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
    color: var(--primary-color);
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    padding: 1.5rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.weight-display {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.weight-slider {
    width: 100%;
}

.flip-statistics {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.stat-item:last-of-type {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: var(--dark);
}

.stat-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.stat-percentage {
    color: #666;
    font-size: 0.875rem;
}

.history-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: #e8e8e8;
}

.history-item-info {
    flex: 1;
}

.history-item-time {
    font-size: 0.75rem;
    color: #666;
}

.history-item-details {
    font-weight: 600;
    margin-top: 0.25rem;
}

.history-item-result {
    font-size: 1.5rem;
    display: flex;
    gap: 0.25rem;
}

.empty-history {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.info-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.info-section h2 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.info-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.probability-explanation {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.probability-explanation h3 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.use-cases {
    margin-top: 2rem;
}

.use-cases h3 {
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.use-cases-grid {
    display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.use-case {
    text-align: center;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.use-case:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.use-case .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.use-case h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.use-case p {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

/* Coin flip animation variations */
.coin.quick-flip {
    animation: quickFlip 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes quickFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(900deg) translateY(-20px); }
    100% { transform: rotateY(1800deg); }
}

/* Sound wave animation */
.coin.sound-enabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: soundWave 0.8s ease-out;
    pointer-events: none;
}

@keyframes soundWave {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Responsive design */
@media (max-width: 992px) {
    .generator-content {
        grid-template-columns: 1fr;
    }
    
    .settings-panel {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .coin {
        width: 200px;
        height: 200px;
    }
    
    .coin-container {
        width: 200px;
        height: 200px;
    }
    
    .coin-face {
        font-size: 3rem;
        border: 6px solid #ffd700;
    }
    
    .coin.coin-type-dollar .coin-face,
    .coin.coin-type-euro .coin-face,
    .coin.coin-type-bitcoin .coin-face,
    .coin.coin-type-gbp .coin-face,
    .coin.coin-type-ruble .coin-face,
    .coin.coin-type-hryvnia .coin-face {
        border: none;
    }
    
    .coin-section {
        padding: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    /* Settings tabs mobile layout */
    .settings-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.875rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .coin {
        width: 150px;
        height: 150px;
    }
    
    .coin-container {
        width: 150px;
        height: 150px;
    }
    
    .coin-face {
        font-size: 2.5rem;
        border: 4px solid #ffd700;
    }
    
    .coin.coin-type-dollar .coin-face,
    .coin.coin-type-euro .coin-face,
    .coin.coin-type-bitcoin .coin-face,
    .coin.coin-type-gbp .coin-face,
    .coin.coin-type-ruble .coin-face,
    .coin.coin-type-hryvnia .coin-face {
        border: none;
    }
    
    .flip-btn {
        font-size: 1.125rem;
        padding: 0.875rem 2rem;
        min-width: 180px;
    }
    
    .result-symbol {
        font-size: 2rem;
    }
    
    .info-section {
        padding: 1.5rem;
    }
    
    /* Settings tabs mobile layout for small screens */
    .settings-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-btn {
        font-size: 0.75rem;
        padding: 0.75rem 0.25rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .coin.coin-type-emoji .coin-face {
        background: linear-gradient(135deg, #2C5F6F, #1E3A47);
    }
    
    .coin.coin-type-simple .coin-face {
        background: linear-gradient(135deg, #4A5DBA, #5A4C99);
    }
}

/* Print styles */
@media print {
    .generator-content,
    .action-buttons {
        display: none;
    }
    
    .info-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}