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

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: #1a1a2e;
}

h1 {
    text-align: center;
    background: linear-gradient(135deg, #ff6ec4 0%, #7873f5 50%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 10px;
    text-shadow: none;
    font-weight: 900;
    letter-spacing: 1px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

h2 {
    text-align: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 30px;
    font-weight: 600;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: clamp(20px, 5vw, 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 10px;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 10px 10px;
    text-align: center;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    transition: background 0.2s ease;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8f9ff;
}

button {
    padding: 14px 28px;
    margin: 8px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

#log {
    margin-top: 30px;
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9ff;
    border-radius: 12px;
    padding: 16px;
}

#log li {
    margin-bottom: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#log::-webkit-scrollbar {
    width: 8px;
}

#log::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#log::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

/* Score Display */
#scoreboard {
    margin: 30px 0;
}

.score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.score-box {
    flex: 1;
    max-width: 150px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cpu-score {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.score-label {
    color: white;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.score-value {
    color: white;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    line-height: 1;
}

.score-divider {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 800;
    color: #667eea;
    padding: 0 10px;
}

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

h3 {
    text-align: center;
    color: #1a1a2e;
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin: 20px 0;
    font-weight: 600;
}

.round-score {
    color: #667eea;
    font-weight: 600;
}

#finalScore {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

#finalScoreInRules {
    text-align: center;
    margin-top: 10px;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

.result-win,
.result-lose,
.result-tie {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.result-win {
    color: #4caf50;
}

.result-lose {
    color: #f5576c;
}

.result-tie {
    color: #667eea;
}

.final-scores {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    font-size: clamp(1rem, 3vw, 1.2rem);
    flex-wrap: wrap;
}

.final-scores .highlight {
    font-weight: 800;
    color: #667eea;
    font-size: 1.3em;
}

.strategy-reveal {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 12px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #555;
}

.strategy-reveal strong {
    color: #667eea;
}

.play-again-container {
    text-align: center;
    margin: 20px 0;
}

#playAgain {
    margin-top: 0;
    padding: 16px 32px;
    font-size: clamp(1rem, 3vw, 1.1rem);
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    display: inline-block;
}

#playAgain:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

/* Policy pages styling */
.policy-content {
    text-align: left;
    line-height: 1.8;
}

.policy-content h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.policy-content p {
    margin-bottom: 15px;
    color: #333;
}

.policy-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.policy-content li {
    margin-bottom: 10px;
    color: #333;
}

.policy-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.policy-content a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Navigation */
.site-nav {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.site-nav a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.site-nav a:hover {
    color: #764ba2;
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    color: #666;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.site-footer p {
    margin: 8px 0;
}

.site-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Bitcoin Donation */
.bitcoin-donate {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f7931a 0%, #ff9500 100%);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.3);
}

.bitcoin-donate p {
    color: white;
    font-weight: 600;
    font-size: clamp(1rem, 3vw, 1.1rem);
    margin-bottom: 12px;
}

.bitcoin-address {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: "Courier New", monospace;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    word-break: break-all;
    font-weight: 600;
    user-select: all;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bitcoin-address:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
    .bitcoin-address {
        font-size: 0.7rem;
        padding: 10px 12px;
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 20px 16px;
        border-radius: 20px;
    }

    button {
        padding: 12px 20px;
        margin: 6px;
        width: calc(50% - 12px);
        font-size: 0.9rem;
    }

    .button-container {
        gap: 8px;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 10px 8px;
    }
}
