:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --success-color: #96ceb4;
    --warning-color: #feca57;
    --danger-color: #ff9ff3;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9ff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e8eaf6;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.2);
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    transition: var(--transition);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 4s ease infinite;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    margin-right: 60px;
}

.theme-toggle {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.theme-toggle button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    font-size: 1.3rem;
    box-shadow: var(--shadow);
}

.theme-toggle button:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.game-modes {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.mode-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
    flex: 1;
    max-width: 180px;
    font-size: 0.9rem;
    justify-content: center;
}

.mode-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    animation: glow 2s ease-in-out infinite;
    border-color: rgba(255, 255, 255, 0.3);
}

.scoreboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.score-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.score-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.score-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.score-item:hover::before {
    left: 100%;
}

.player-name {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.score {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.status {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite, textGradient 3s ease infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: min(95vw, 450px);
    margin: 0 auto 20px;
    aspect-ratio: 1;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.cell {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.cell:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.cell:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.cell.x {
    color: #ff6b6b;
    background: linear-gradient(135deg, #ffe8e8, #fff0f0);
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.cell.o {
    color: #4ecdc4;
    background: linear-gradient(135deg, #e8fffe, #f0ffff);
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

.cell.winning {
    background: linear-gradient(135deg, #feca57, #ff9ff3, #54a0ff);
    background-size: 200% 200%;
    color: white;
    animation: winPulse 1s infinite, gradientShift 2s ease infinite;
    box-shadow: 0 0 30px rgba(254, 202, 87, 0.8);
    transform: scale(1.1);
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    color: white;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.game-history {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-history h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 10px 15px;
    margin-bottom: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.win-modal {
    text-align: center;
}

.win-animation {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.win-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounceIn {
    0% { 
        transform: scale(0) rotate(180deg); 
        opacity: 0;
    }
    50% { 
        transform: scale(1.3) rotate(90deg); 
        opacity: 0.8;
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1;
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes textGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 0 40px rgba(78, 205, 196, 0.6); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 8px;
        min-height: 100vh;
    }
    
    header {
        padding: 12px 15px;
        margin-bottom: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-right: 50px;
    }
    
    .theme-toggle {
        right: 15px;
    }
    
    .theme-toggle button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .game-modes {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .mode-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
        gap: 6px;
        max-width: 160px;
    }
    
    .scoreboard {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .score-item {
        padding: 6px 8px;
    }
    
    .player-name {
        font-size: 0.6rem;
    }
    
    .score {
        font-size: 1rem;
    }
    
    .game-container {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .status {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .board {
        width: min(98vw, 380px);
        gap: 10px;
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .cell {
        font-size: clamp(2.5rem, 7vw, 4rem);
    }
    
    .game-controls {
        gap: 8px;
        justify-content: center;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        gap: 6px;
        flex: 1;
        min-width: 120px;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .game-history {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    header h1 {
        font-size: 1.6rem;
        margin-right: 45px;
    }
    
    .theme-toggle button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .mode-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        max-width: 140px;
    }
    
    .board {
        width: min(98vw, 340px);
        gap: 8px;
        padding: 10px;
    }
    
    .cell {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
    
    .score-item {
        padding: 4px 6px;
    }
    
    .player-name {
        font-size: 0.55rem;
    }
    
    .score {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float-particle 8s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* Cell Glow Effect */
.cell-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cell:hover .cell-glow {
    opacity: 1;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.2) 0%, transparent 70%);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* Confetti Animation */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall 3s ease-out forwards;
}

.confetti-piece:nth-child(2n) { background: #4ecdc4; }
.confetti-piece:nth-child(3n) { background: #45b7d1; }
.confetti-piece:nth-child(4n) { background: #feca57; }
.confetti-piece:nth-child(5n) { background: #ff9ff3; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Enhanced Win Animation */
.win-animation {
    font-size: 5rem;
    color: #feca57;
    margin-bottom: 20px;
    animation: trophy-bounce 1s ease-in-out infinite, trophy-glow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(254, 202, 87, 0.6));
}

@keyframes trophy-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-20px) scale(1.1);
    }
    60% {
        transform: translateY(-10px) scale(1.05);
    }
}

@keyframes trophy-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(254, 202, 87, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(254, 202, 87, 1));
    }
}

/* Enhanced Status with Typing Effect */
.status.typing::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* About Section Styles */
.about-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.about-section.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.about-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.4s ease;
    margin-top: 20px;
}

.about-container h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px 30px;
    margin: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-size: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
}

.about-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-card ul {
    list-style: none;
    padding: 0;
}

.about-card li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.about-card li:last-child {
    border-bottom: none;
}

.about-card p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-primary);
}

.about-card a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-card a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* FAQ Section */
.faq-section {
    padding: 0 30px 20px;
}

.faq-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-question:hover {
    background: rgba(255, 107, 107, 0.1);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 0 20px 20px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Copyright Section */
.copyright-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px 30px;
    text-align: center;
    margin: 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.copyright-section p {
    margin: 5px 0;
    font-size: 0.95rem;
}

.social-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.1);
}

.close-about {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
}

.close-about:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Mobile Responsive for About Section */
@media (max-width: 768px) {
    .about-section {
        padding: 10px;
    }
    
    .about-container {
        margin-top: 10px;
        max-height: 95vh;
    }
    
    .about-container h2 {
        font-size: 1.5rem;
        padding: 20px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .about-card {
        padding: 20px;
    }
    
    .faq-section {
        padding: 0 20px 20px;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 1rem;
    }
    
    .copyright-section {
        padding: 20px;
    }
    
    .close-about {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .social-links a {
        font-size: 1.3rem;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .about-container h2 {
        font-size: 1.3rem;
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .about-content {
        padding: 15px;
        gap: 15px;
    }
    
    .about-card {
        padding: 15px;
    }
    
    .about-card h3 {
        font-size: 1.1rem;
    }
    
    .faq-section {
        padding: 0 15px 15px;
    }
    
    .faq-section h3 {
        font-size: 1.3rem;
    }
    
    .faq-question {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .copyright-section {
        padding: 15px;
    }
    
    .social-links {
        gap: 10px;
    }
}

/* Dark Theme Adjustments for About Section */
[data-theme="dark"] .about-container {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .about-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .faq-item {
    background: var(--bg-secondary);
}

[data-theme="dark"] .faq-question {
    color: var(--text-primary);
}

[data-theme="dark"] .faq-answer p {
    color: var(--text-secondary);
}

/* Ad Banner Styles */
.ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.5s ease;
}

.ad-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
    flex-shrink: 0;
}

.ad-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin: 0 10px;
}

.sample-ad {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    max-width: 320px;
    cursor: pointer;
    transition: var(--transition);
}

.sample-ad:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.sample-ad p {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.sample-ad small {
    font-size: 0.7rem;
    opacity: 0.8;
}

.ad-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-close:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

.ad-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Adjust container padding when ad is visible */
body:not(.ad-hidden) .container {
    padding-bottom: 80px;
}

/* Mobile Ad Banner */
@media (max-width: 768px) {
    .ad-content {
        padding: 6px 10px;
    }
    
    .ad-label {
        font-size: 0.6rem;
        margin-right: 8px;
    }
    
    .sample-ad {
        padding: 8px 15px;
        max-width: 280px;
    }
    
    .sample-ad p {
        font-size: 0.8rem;
    }
    
    .sample-ad small {
        font-size: 0.65rem;
    }
    
    .ad-close {
        font-size: 1.3rem;
        width: 25px;
        height: 25px;
    }
    
    body:not(.ad-hidden) .container {
        padding-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .ad-content {
        padding: 5px 8px;
    }
    
    .sample-ad {
        padding: 6px 12px;
        max-width: 250px;
    }
    
    .sample-ad p {
        font-size: 0.75rem;
    }
    
    body:not(.ad-hidden) .container {
        padding-bottom: 65px;
    }
}

/* Dark theme ad banner */
[data-theme="dark"] .ad-banner {
    background: rgba(26, 32, 44, 0.95);
    border-top-color: var(--border-color);
}

/* Animation for ad banner */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-primary: #000000;
        --bg-primary: #ffffff;
    }
    
    .about-card {
        border: 2px solid #000000;
    }
    
    .faq-item {
        border: 2px solid #000000;
    }
    
    .ad-banner {
        border-top: 3px solid #000000;
    }
}