body {
    background-color: #1a1a1a;
    color: white;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0; /* Remove padding since footer won't be fixed */
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.header {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header h1 {
    margin: 0;
    padding: 20px 0;
    font-size: 2.5rem;
}

.flip-counter {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    font-family: 'Poppins', monospace;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    height: 600px; /* Fixed height to prevent shifting */
    perspective: 1000px;
}

.coin-wrapper {
    width: 400px;
    height: 400px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.coin {
    width: 400px;  /* Increased from 300px */
    height: 400px; /* Increased from 300px */
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform-style: preserve-3d;
    transition: transform 1.5s ease-out;
}

.coin .heads,
.coin .tails {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: bold;
    border: 12px solid #b27b00;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.5),
        0 0 20px rgba(255,215,0,0.3);
    text-transform: uppercase;
    letter-spacing: 4px;
    transform-style: preserve-3d;
}

.heads {
    background: radial-gradient(circle at 30% 30%, 
        #ffd700 0%,
        #ffc800 30%,
        #b27b00 70%
    );
    color: #000000;
    text-shadow: 
        0 0 5px #ffffff,
        0 0 10px #ffd700;
    transform: rotateZ(0deg);
}

.tails {
    background: radial-gradient(circle at 30% 30%, 
        #daa520 0%,
        #c17900 40%,
        #613d00 80%
    );
    transform: rotateX(180deg) rotateZ(0deg); /* Changed to keep text upright */
    color: #ffffff;
    text-shadow: 
        0 0 5px #000000,
        0 0 10px #613d00;
}

.coin::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent 45%, rgba(255,215,0,0.2) 50%, transparent 55%);
    z-index: 2;
    pointer-events: none;
}

.button-container {
    position: absolute;
    bottom: 100px; /* Increased from 60px to move button up */
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

button {
    padding: 20px 40px;    /* Larger padding */
    font-size: 24px;       /* Larger font */
    cursor: pointer;
    border-radius: 5px;
    border: none;
    background: linear-gradient(145deg, #4CAF50, #388E3C);
    color: white;
    min-width: 200px;      /* Minimum width */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin: 10px auto;     /* Added top margin to move down */
    display: block;        /* Ensures proper centering */
    margin-left: -100px; * Changed from -100px to move right */
    margin-right: auto;    /* Keep auto margin on right */
    margin-top: 30px;      /* Add more space between coin and button */
    position: relative;    /* Ensure proper positioning */
    bottom: 450px;         /* Position from bottom, close to coin */
    top: auto;            /* Remove top positioning */
}

button:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transform: none; /* Remove transform on hover */
}

button:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#resetButton {
    background: linear-gradient(145deg, #ff4444, #cc0000);
    margin-left: 1px;
}

#resetButton:hover {
    background: linear-gradient(145deg, #ff5555, #dd0000);
}

/* Result indicator styles */
#result {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    transform: none;
    height: 40px; /* Fixed height */
}

#result.show {
    opacity: 1;
    transform: none; /* Remove scale animation that might cause shifting */
}

/* SEO content styles */
.seo-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px 60px; /* Added bottom padding */
    line-height: 1.6;
    margin-bottom: 40px; /* Add space before footer */
}

.seo-content h2 {
    color: #4CAF50;
    margin-top: 40px;
    font-size: 1.8rem;
}

.seo-content h3 {
    color: #ffd700;
    margin-top: 30px;
    font-size: 1.4rem;
}

.seo-content p {
    margin: 15px 0;
    color: #ccc;
}

.seo-content ul {
    list-style-type: none;
    padding: 0;
}

.seo-content ul li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
    color: #ccc;
}

.seo-content ul li::before {
    content: "•";
    color: #4CAF50;
    position: absolute;
    left: 0;
}

/* Footer Styles */
.shared-footer {
    position: static; /* Changed from relative */
    width: 100%;
    background-color: #111111;
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid #333;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.shared-footer p {
    margin: 5px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #4CAF50;
}

/* Counter styles */
.stats-container {
    position: absolute;
    right: -180px;
    bottom: 450px; /* Match button position */
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: opacity 0.3s ease;
}

.stats-container.show {
    opacity: 1;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 150px; /* Added to maintain consistent width */
    font-size: 20px; /* Increased font size */
    letter-spacing: 0.5px;
}

.reset-button {
    background: linear-gradient(145deg, #ff4444, #cc0000);
    padding: 10px 20px;
    font-size: 16px;
    margin-top: 15px; /* Add space between stats and button */
    min-width: 150px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    width: 100%; /* Make button match width of stats */
    /* Remove conflicting styles */
    position: static;
    bottom: auto;
    margin-left: auto;
    margin-right: auto;
    transform: none;
    display: block;
    /* Remove any position/margin overrides */
    margin-left: 0;
    margin-right: 0;
}

.reset-button:hover {
    background: linear-gradient(145deg, #ff5555, #dd0000);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.reset-button:active {
    transform: translateY(1px);
}

/* Override any conflicting button styles */
.stats-container button {
    position: static;
    margin: 15px 0 0 0;
    bottom: auto;
    display: block;
    width: 100%;
    /* Remove any other button style overrides */
    margin-left: 0;
    margin-right: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .stats-container {
        position: absolute;
        right: -180px;
        bottom: 450px; /* Keep aligned with button */
    }
}

@media (max-width: 900px) {
    .stats-container {
        position: static;
        flex-direction: row;
        justify-content: center;
        gap: 30px;
        margin-top: 40px;
        opacity: 1;
    }
}

/* Games directory styles */
.games-directory {
    text-align: center;
    margin: 60px 0 30px;
    width: 100%;
    max-width: 600px;
}

.games-directory h2 {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.games-list {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px;
}

.game-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.game-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.game-title {
    font-size: 1.2rem;
    font-weight: 500;
}

.game-arrow {
    opacity: 0.7;
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.game-link:hover .game-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* Remove old other-tools styles */
.other-tools, .tool-link {
    display: none;
}
