* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-link {
    color: #ffeb3b;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: #ff6b6b;
    transform: translateY(-2px);
}

/* Ad Spaces */
.ad-space {
    background: rgba(0, 0, 0, 0.5);
    border: 2px dashed #ffeb3b;
    text-align: center;
    padding: 20px;
    margin: 10px auto;
    color: #ffeb3b;
}

.ad-header,
.ad-footer {
    max-width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sidebar {
    flex-shrink: 0;
}

.game-section {
    flex: 1;
    background: rgba(0, 0, 0, 0.7);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.game-intro,
.game-content {
    margin-bottom: 30px;
    line-height: 1.8;
}

.game-intro h2,
.game-content h3 {
    color: #ffeb3b;
    margin-bottom: 15px;
}

.game-intro h3 {
    margin-top: 25px;
    font-size: 1.5rem;
}

.game-intro ul {
    margin-left: 20px;
    margin-top: 10px;
}

.game-intro li {
    margin-bottom: 10px;
}

/* Tic Tac Toe Game */
.tic-tac-toe {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 0 30px rgba(255, 235, 59, 0.3);
}

.tic-tac-toe h2 {
    color: #ffeb3b;
    margin-bottom: 20px;
    font-size: 2rem;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 10px;
    justify-content: center;
    margin: 20px auto;
}

.cell {
    width: 100px;
    height: 100px;
    background: #ffeb3b;
    color: #000;
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cell:hover {
    background: #ffc107;
    transform: scale(1.05);
}

.cell.winner {
    background: #4caf50;
    animation: winPulse 0.5s ease;
}

@keyframes winPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.status-text {
    font-size: 1.5rem;
    margin: 20px 0;
    color: #ffeb3b;
    font-weight: bold;
}

.restart-btn {
    background: #ff6b6b;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.restart-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ffeb3b;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff6b6b;
}

.copyright {
    color: #fff;
    font-size: 0.9rem;
}

.heart {
    color: #ff6b6b;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Articles Page Styles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.article-card {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: #ffeb3b;
    box-shadow: 0 8px 20px rgba(255, 235, 59, 0.3);
}

.article-card h3 {
    color: #ffeb3b;
    margin-bottom: 10px;
}

.article-card p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-card a {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: bold;
}

.article-card a:hover {
    color: #ffeb3b;
}

/* Content Pages */
.content-page {
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 15px;
    max-width: 1000px;
    margin: 20px auto;
    line-height: 1.8;
}

.content-page h1 {
    color: #ffeb3b;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.content-page h2 {
    color: #4ecdc4;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.content-page h3 {
    color: #ffeb3b;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.content-page p {
    margin-bottom: 15px;
}

.content-page ul,
.content-page ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-page li {
    margin-bottom: 10px;
}

.content-page a {
    color: #4ecdc4;
    text-decoration: none;
}

.content-page a:hover {
    color: #ffeb3b;
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 30px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffeb3b;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffeb3b;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    background: rgba(255, 255, 255, 0.15);
}

.submit-btn {
    background: #ff6b6b;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .ad-sidebar {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .nav {
        flex-direction: column;
        align-items: center;
    }
    
    .board {
        grid-template-columns: repeat(3, 80px);
    }
    
    .cell {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .content-page {
        padding: 20px;
    }
    
    .content-page h1 {
        font-size: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .board {
        grid-template-columns: repeat(3, 70px);
    }
    
    .cell {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .ad-header,
    .ad-footer {
        max-width: 100%;
        height: auto;
        min-height: 90px;
    }
}