body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.footer {
    background-color: #333;
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.chessboard {
    width: calc(floor(min(1200, 100vw - 24, 100vh - 200) / 8) * 8 * 1px);
    aspect-ratio: 1 / 1;
    margin: 20px auto;
    border: 2px solid #333;
}

/* Chess game layout */
.chess-game {
    max-width: 600px;
    margin: 0 auto;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.status {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.status.thinking {
    color: #666;
    font-style: italic;
}

.engine-info {
    color: #666;
    font-size: 0.9em;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.engine-ready {
    display: block;
}

.game-controls {
    margin: 20px 0;
}

.engine-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn.active {
    opacity: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.game-instructions {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: left;
}

.game-instructions h3 {
    margin-top: 0;
    color: #333;
}

.game-instructions ul {
    padding-left: 20px;
}

.game-instructions li {
    margin-bottom: 5px;
    color: #666;
}

/* Progress bar styling */
.thinking-progress {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.progress-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 6px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* Opening name display */
.opening-name {
    margin: 10px 0;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
    color: #495057;
    text-align: center;
    min-height: 20px;
    font-style: italic;
    border: 1px solid #dee2e6;
}

/* Landing page styles */
.landing-page {
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-section {
    padding: 2rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: left;
}

.hero-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.6;
}

.game-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-mode-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-mode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.game-mode-card h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.game-mode-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.game-mode-features {
    margin-bottom: 2rem;
}

.game-mode-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-mode-features li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.game-mode-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.features-section {
    margin-top: 4rem;
    padding: 2rem 0;
}

.features-section h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.feature-item h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .game-modes {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-mode-card {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Setup description styles */
.setup-description {
    text-align: left;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.setup-description h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.setup-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.setup-description li {
    padding: 0.5rem 0;
    color: #666;
    line-height: 1.5;
}

/* FAQ section styles */
.faq-section {
    text-align: left;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    cursor: pointer;
    position: relative;
    padding-left: 1.5rem;
}

.faq-question::before {
    content: "Q:";
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
}

.faq-answer {
    color: #666;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.faq-answer::before {
    content: "A:";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Technology and Play sections */
.tech-section, .play-section {
    text-align: left;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tech-section h2, .play-section h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.tech-section p, .play-section p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

