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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 10px 15px;
    background: linear-gradient(135deg, #3f51b5, #2196f3);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    animation: headerGlow 3s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header h1 {
    font-size: 24px;
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
}

.game-header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
}

.container {
    max-width: 540px;
    margin: 15px auto;
    padding: 0 15px;
    width: 100%;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.difficulty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: #1a1a1a;
    cursor: pointer;
}

.game-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 16px;
}

.timer {
    font-weight: 600;
}

.pause-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    color: #666;
}

.pause-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.pause-btn:active {
    transform: scale(1);
}

#board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    background-color: #ccc;
    border: 2px solid #1a1a1a;
    margin-bottom: 15px;
    aspect-ratio: 1;
    max-width: 100%;
    width: 100%;
}

.cell {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background-color: white;
    border: 1px solid #ccc;
    font-size: clamp(16px, 4vw, 28px);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.cell.selected {
    background-color: #bbdefb !important;
}

.cell.related {
    background-color: #e3f2fd;
}

.cell.same-number {
    background-color: #e8eaf6;
}

.cell.error {
    color: #d32f2f !important;
    animation: shake 0.5s;
}

.cell.given {
    color: #1a1a1a;
    font-weight: 600;
}

.cell:not(.given) {
    color: #2196f3;
}

.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}

.control-btn {
    flex: 1;
    min-width: auto;
    padding: 8px;
    font-size: 18px;
}

.control-btn:hover {
    background-color: #f0f0f0;
}

.control-btn.active {
    color: #2196f3;
    background-color: #e3f2fd;
}

.control-btn.new-game {
    background-color: #4CAF50;
    color: white;
    width: 120px;
    height: 45px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-btn.new-game i {
    display: none;
}

.control-btn.new-game::after {
    content: "New Game";
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Horizontal layout for hint button */
.control-btn.hint {
    background-color: #ffe5e5;
    color: #000;
    position: relative;
    width: 90px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    margin-right: 10px;
    border: 2px solid #2196f3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Adjust icon */
.control-btn.hint i {
    font-size: 20px;
    margin: 0;
}

/* Keep the count design */
.control-btn.hint .hint-count {
    font-size: 16px;
    font-weight: bold;
    background-color: white;
    border-radius: 12px;
    padding: 1px 6px;
    line-height: 1;
    border: 1px solid #ddd;
    margin: 0;
}

/* Keep the Ad badge */
.control-btn.hint::after {
    content: "Ad";
    position: absolute;
    right: -5px;
    top: -5px;
    background-color: #ff4444;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
    margin-top: 15px;
    width: 100%;
}

.num-btn {
    aspect-ratio: 1;
    font-size: clamp(16px, 3vw, 20px);
    padding: 0;
    border: none;
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.num-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.num-btn:active {
    transform: translateY(0);
}

/* Add styles for disabled buttons during pause */
.num-btn:disabled,
.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.overlay-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

.overlay-content h2 {
    font-size: 24px;
    margin-bottom: 1rem;
    color: #d32f2f;
}

.overlay-content p {
    margin: 0.5rem 0;
    font-size: 16px;
    color: #666;
}

#restart-game, #new-game {
    margin-top: 1.5rem;
    padding: 12px 24px;
    font-size: 16px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

#restart-game:hover, #new-game:hover {
    background-color: #303f9f;
    transform: translateY(-2px);
}

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

/* Add blur effect to the game board when overlay is shown */
.game-container.blurred {
    filter: blur(5px);
    pointer-events: none;
}

.stats-container {
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Improve 3x3 box borders */
.cell:nth-child(3n) {
    border-right: 2px solid #1a1a1a;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #1a1a1a;
}

.cell.hint {
    color: #4caf50;
    font-weight: 600;
}

@keyframes headerGlow {
    0% { box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(33, 150, 243, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3); }
}

/* Media Queries */
@media screen and (max-width: 480px) {
    .game-header h1 {
        font-size: 20px;
    }

    .game-info {
        font-size: 14px;
        padding: 8px;
    }

    .game-stats {
        gap: 10px;
        font-size: 14px;
    }

    .difficulty {
        font-size: 16px;
    }

    .game-controls {
        padding: 8px;
        gap: 5px;
    }

    .control-btn {
        padding: 6px 12px;
        font-size: 16px;
    }

    .hint-count {
        font-size: 12px;
    }

    .main-menu a {
        font-size: 14px;
        padding: 4px 10px;
    }

    .modal-content {
        margin: 15% auto;
        padding: 20px;
    }
}

@media screen and (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .game-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .number-pad {
        gap: 3px;
    }

    .num-btn {
        font-size: 16px;
    }
}

/* Make sure the board stays square */
.game-container {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

/* Add styles for the menu */
.main-menu {
    margin-top: 15px;
    width: 100%;
}

.main-menu ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 10px;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    display: block;
}

.main-menu a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

.main-menu a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Modal styles for How to Play */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.how-to-play-content {
    margin-top: 20px;
    text-align: left;
}

.how-to-play-content h3 {
    margin: 15px 0 10px;
    color: #3f51b5;
}

.how-to-play-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.how-to-play-content li {
    margin-bottom: 8px;
}

/* Media query for smaller screens */
@media screen and (max-width: 480px) {
    .main-menu a {
        font-size: 14px;
        padding: 4px 10px;
    }
    
    .modal-content {
        margin: 15% auto;
        padding: 20px;
    }
}

/* Content page styles */
.content-page {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.content-page h2 {
    color: #3f51b5;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.content-page h3 {
    color: #2196f3;
    margin: 20px 0 10px;
    font-size: 20px;
}

.how-to-play-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.how-to-play-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.how-to-play-content li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.back-button-container {
    margin-top: 30px;
    text-align: center;
}

.back-button {
    display: inline-block;
    background: #3f51b5;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background: #303f9f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Blog styles */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #3f51b5;
}

.blog-item h3 {
    margin-top: 0;
    color: #1a1a1a;
}

.blog-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    color: #3f51b5;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
}

.read-more:hover {
    text-decoration: underline;
}

@media screen and (max-width: 480px) {
    .content-page {
        padding: 15px;
    }
    
    .blog-item {
        padding: 15px;
    }
}

/* Blog category filters */
.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.category-btn {
    background: #f0f2f5;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    background: #e4e6e9;
    color: #333;
}

.category-btn.active {
    background: #3f51b5;
    color: white;
}

/* Enhanced blog items */
.blog-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #3f51b5;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-item h3 {
    margin-top: 0;
    color: #1a1a1a;
    font-size: 20px;
}

.blog-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.blog-date::before {
    content: '\f073';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 5px;
    color: #3f51b5;
}

.blog-item p {
    line-height: 1.6;
    color: #444;
}

.read-more {
    display: inline-block;
    color: #3f51b5;
    text-decoration: none;
    font-weight: 500;
    margin-top: 15px;
    padding: 5px 0;
    position: relative;
}

.read-more::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.2s;
}

.read-more:hover::after {
    transform: translateX(3px);
}

.read-more:hover {
    color: #303f9f;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .blog-categories {
        gap: 5px;
    }
    
    .category-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .blog-item h3 {
        font-size: 18px;
    }
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination button {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not([disabled]) {
    background: #f0f0f0;
    border-color: #bbb;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #3f51b5;
    color: white;
    border-color: #3f51b5;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

/* Blog excerpt styles */
.blog-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Blog modal styles */
.blog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.blog-modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.blog-content {
    margin-top: 20px;
    line-height: 1.7;
}

.blog-content h3 {
    margin: 25px 0 15px;
    color: #3f51b5;
}

.blog-content p {
    margin-bottom: 15px;
}

.blog-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.blog-content li {
    margin-bottom: 8px;
}

/* Animation for modal */
@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Read more button styling */
.read-more {
    display: inline-block;
    background: #3f51b5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.read-more:hover {
    background: #303f9f;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.read-more:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .blog-modal-content {
        padding: 20px;
        margin: 10% auto;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Blog post page styles */
.blog-post-page {
    padding: 30px;
}

.blog-post-page h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.blog-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.back-to-blogs {
    color: #3f51b5;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-to-blogs:hover {
    color: #303f9f;
}

.blog-nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-button {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-button:hover {
    color: #3f51b5;
}

.nav-button.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.blog-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.blog-categories-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tag {
    background: #f0f2f5;
    color: #3f51b5;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.category-tag:hover {
    background: #e4e6e9;
    transform: translateY(-2px);
}

.related-posts {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.related-posts h3 {
    margin-bottom: 20px;
    color: #3f51b5;
}

#related-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-post {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.related-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-post h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.related-post h4 a {
    color: #1a1a1a;
    text-decoration: none;
}

.related-post h4 a:hover {
    color: #3f51b5;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .blog-post-page {
        padding: 20px;
    }
    
    .blog-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .blog-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    #related-posts-container {
        grid-template-columns: 1fr;
    }
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.dialog-buttons button {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

#cancel-new-game {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
}

#cancel-new-game:hover {
    background-color: #e0e0e0;
}

#confirm-new-game {
    background-color: #4caf50;
    border: none;
    color: white;
}

#confirm-new-game:hover {
    background-color: #45a049;
}

/* Styling for the ad button */
.ad-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.ad-button:hover {
    background-color: #f57c00;
}

.ad-button i {
    font-size: 18px;
}

/* Hint reward message */
.hint-reward-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    animation: slideDown 0.3s ease-out;
}

.hint-reward-message.fade-out {
    opacity: 0;
    transition: opacity 0.5s;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Ad overlay styles - updated for better responsiveness */
.ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 15px;
}

.ad-container {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.ad-header span {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.close-ad-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-ad-btn:hover {
    background: #e0e0e0;
}

.ad-content {
    padding: 15px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Make ad content responsive */
#interstitial-ad-container, 
#ad-placeholder {
    width: 100%;
    max-width: 300px;
    height: auto;
    min-height: 250px;
    margin: 0 auto;
}

.ad-timer {
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

#ad-countdown {
    font-weight: bold;
    color: #ff9800;
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .ad-container {
        width: 95%;
    }
    
    .ad-content {
        padding: 10px;
    }
    
    #interstitial-ad-container, 
    #ad-placeholder {
        max-width: 100%;
    }
}

/* Updated hint button styles with reduced size */
.control-btn.hint {
    background-color: #ffe5e5;
    color: #000;
    position: relative;
    width: 90px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    margin-right: 10px;
    border: 2px solid #2196f3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-btn.hint i {
    font-size: 20px;
    margin: 0;
}

.control-btn.hint .hint-count {
    font-size: 16px;
    font-weight: bold;
    background-color: white;
    border-radius: 12px;
    padding: 1px 6px;
    line-height: 1;
    border: 1px solid #ddd;
    margin: 0;
}

/* Updated new game button styles with reduced size */
.control-btn.new-game {
    background-color: #4CAF50;
    color: white;
    width: 120px;
    height: 45px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Maintain the layout with smaller buttons */
.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}

/* Also adjust the eraser and undo buttons to match */
.control-btn.undo, .control-btn.eraser {
    width: 40px;
    height: 40px;
    margin-right: 5px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} 