* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #F39C12;
    --heads-color: #3498db;
    --tails-color: #e74c3c;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #ffffff;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    padding: 20px;
    flex-shrink: 0;
}

body > .container:first-of-type {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.coin-container {
    perspective: 1000px;
    margin: 40px auto;
    width: 250px;
    height: 250px;
}

.coin {
    width: 250px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.coin:hover {
    transform: scale(1.05);
}

.coin:active {
    transform: scale(0.95);
}

.coin.flipping {
    pointer-events: none;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    box-shadow: var(--shadow);
    border: 8px solid #ffd700;
}

.coin-inner {
    font-size: 6rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.heads {
    background: linear-gradient(145deg, #3498db, #2980b9);
    transform: rotateY(0deg);
}

.tails {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    transform: rotateY(180deg);
}

/* Flip animations - 1800deg = 5 full rotations ending on heads, 1980deg = 5.5 rotations ending on tails */
@keyframes flipHeads {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(1800deg);
    }
}

@keyframes flipTails {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(1980deg);
    }
}

.coin.flip-heads {
    animation: flipHeads 2s ease-out forwards;
}

.coin.flip-tails {
    animation: flipTails 2s ease-out forwards;
}

.result {
    font-size: 2rem;
    font-weight: bold;
    margin: 30px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.result.show {
    opacity: 1;
    transform: scale(1);
}

.result.heads-result {
    color: #3498db;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.result.tails-result {
    color: #e74c3c;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.counters {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.counter {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    flex: 1;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.counter:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.counter h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.counter-value {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.heads-counter .counter-value {
    color: #3498db;
}

.tails-counter .counter-value {
    color: #e74c3c;
}

.counter.active {
    animation: pulse 0.5s ease;
}

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

footer {
    margin-top: 40px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .coin-container {
        width: 200px;
        height: 200px;
    }
    
    .coin {
        width: 200px;
        height: 200px;
    }
    
    .coin-inner {
        font-size: 4rem;
    }
    
    .result {
        font-size: 1.5rem;
    }
    
    .counter-value {
        font-size: 2rem;
    }
    
    .counters {
        flex-direction: column;
    }
}

/* Install button for PWA */
.install-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.install-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: none;
}

.install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.install-button.show {
    display: block;
}

/* Google Ads Container */
.ads-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 728px;
    text-align: center;
}

/* Info Section Styles */
.info-section {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 60px 20px;
    margin-top: 60px;
}

.info-section .container {
    max-width: 800px;
    text-align: left;
}

.info-section h2 {
    color: #667eea;
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: left;
}

.info-section h2:first-of-type {
    margin-top: 0;
}

.info-section h3 {
    color: #764ba2;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.info-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #444;
}

.info-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.info-section li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 10px;
    color: #444;
}

.info-section strong {
    color: #667eea;
}

/* Responsive adjustments for info section */
@media (max-width: 600px) {
    .info-section {
        padding: 40px 15px;
    }
    
    .info-section h2 {
        font-size: 1.5rem;
    }
    
    .info-section h3 {
        font-size: 1.2rem;
    }
    
    .info-section p,
    .info-section li {
        font-size: 1rem;
    }
}
