/* Global Styles */
:root {
    --primary-color: #8b4513;
    --secondary-color: #a0522d;
    --accent-color: #cd853f;
    --background-color: #f5f5dc;
    --text-color: #3e2723;
    --light-text: #5d4037;
    --border-color: #d7ccc8;
    --card-background: #ffffff;
    --success-color: #4caf50;
    --error-color: #f44336;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    background-image: 
        linear-gradient(rgba(245, 245, 220, 0.9), rgba(245, 245, 220, 0.9)),
        url('../images/texture.png');
    background-attachment: fixed;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--accent-color), transparent);
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Roboto', sans-serif;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Header Styles */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ensure navigation is positioned to the right */
.nav {
    margin-left: auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav li {
    margin-left: 2rem;
    margin-bottom: 0;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(rgba(139, 69, 19, 0.05), rgba(245, 245, 220, 0.05));
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-text {
    margin-bottom: 2rem;
}

.hero-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-image {
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    border: 10px solid white;
    transform: rotate(-1deg);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

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

.feature-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(205, 133, 63, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
}

/* History Section */
.history {
    padding: 4rem 0;
    background-color: rgba(255, 255, 255, 0.5);
}

.history-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.history-image {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    border: 10px solid white;
    transform: rotate(1deg);
}

.history-image img {
    width: 100%;
    height: auto;
    display: block;
}

.history-text {
    text-align: center;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 4rem;
    color: rgba(139, 69, 19, 0.1);
    font-family: 'Playfair Display', serif;
}

.testimonial-text {
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(139, 69, 19, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--primary-color);
}

.author-avatar svg {
    width: 24px;
    height: 24px;
}

.author-info h4 {
    margin: 0;
    font-size: 1rem;
}

.author-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

/* CTA Section */
.cta {
    padding: 4rem 0;
    background-color: var(--primary-color);
    color: white;
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    color: white;
}

.cta-content h2::after {
    background: linear-gradient(to right, white, transparent);
}

.cta-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-content .primary-btn {
    background-color: white;
    color: var(--primary-color);
}

.cta-content .primary-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

/* Footer Styles */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    filter: invert(100%);
}

.footer-logo h3 {
    margin: 0;
    color: white;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links li {
    margin: 0 1rem 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-legal ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-legal li {
    margin: 0 1rem 0.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* About Page Styles */
.about-section {
    padding: 4rem 0;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-history, .about-features {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.feature-list {
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.feature-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

.about-philosophy {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Contact Page Styles */
.contact-section {
    padding: 4rem 0;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
    text-align: center;
}

.contact-email {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.contact-email svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    margin-right: 10px;
}

.faq {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.faq-items {
    margin-top: 1.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.faq-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Privacy Policy and Terms of Service Pages */
.privacy-section, .terms-section {
    padding: 4rem 0;
}

.privacy-content, .terms-content {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.last-updated {
    font-style: italic;
    color: var(--light-text);
    margin-bottom: 2rem;
    text-align: right;
}

.privacy-intro, .terms-intro {
    margin-bottom: 2rem;
}

.privacy-section > h3, .terms-section > h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Data Collection Table */
.data-collection-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.data-collection-table th, .data-collection-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-collection-table th {
    background-color: rgba(139, 69, 19, 0.1);
    font-weight: 500;
    color: var(--primary-color);
}

.data-collection-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.5);
}

.data-collection-table tr:hover {
    background-color: rgba(139, 69, 19, 0.05);
}

/* Game Page Styles */
.game-section {
    padding: 4rem 0;
}

.game-content {
    max-width: 800px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    text-align: center;
}

.game-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

#difficulty {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    min-width: 250px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    background-color: var(--card-background);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.mines-counter, .timer {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.mines-counter svg, .timer svg {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    color: var(--primary-color);
}

.game-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.game-board {
    display: grid;
    gap: 2px;
    background-color: var(--border-color);
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.cell {
    width: 30px;
    height: 30px;
    background-color: var(--accent-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: var(--transition);
}

.cell:hover:not(.revealed):not(.flagged) {
    background-color: var(--secondary-color);
}

.cell.revealed {
    background-color: white;
    cursor: default;
}

.cell.mine.revealed {
    background-color: var(--error-color);
    color: white;
}

.cell.flagged {
    background-color: var(--primary-color);
    color: white;
}

/* Game Instructions */
.game-instructions {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.game-instructions ul {
    margin-top: 1rem;
}

.game-instructions li {
    margin-bottom: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .hero-content {
        flex-direction: row;
        text-align: left;
    }
    
    .hero-text {
        flex: 1;
        margin-right: 2rem;
        margin-bottom: 0;
    }
    
    .hero-image {
        flex: 1;
        max-width: none;
    }
    
    .history-content {
        flex-direction: row;
    }
    
    .history-image {
        flex: 1;
        margin-right: 2rem;
        margin-bottom: 0;
    }
    
    .history-text {
        flex: 1;
        text-align: left;
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
    
    .game-controls {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav li {
        margin: 0 0.5rem 0.5rem;
    }
    
    .data-collection-table {
        font-size: 0.9rem;
    }
    
    .data-collection-table th, .data-collection-table td {
        padding: 8px 10px;
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .cell {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .data-collection-table {
        display: block;
        overflow-x: auto;
    }
}