/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); /* Updated URL for Inter font */

/* Dark Mode Variables */
:root {
    --bg-dark: #111827;
    --bg-medium: #1f2937;
    --bg-light: #374151; /* Added a slightly lighter dark shade */
    --text-light: #e5e7eb;
    --text-medium: #9ca3af;
    --primary-accent: #60a5fa; /* Brighter blue */
    --primary-accent-rgb: 96, 165, 250; /* RGB for box-shadow */
    --border-color: #374151;
    --primary-color: var(--primary-accent); /* Alias for compatibility */
    --primary-dark: #2563eb; /* Keep for gradient if needed, or replace */
    --text-dark: var(--text-light); /* Replace old dark text with light */
    --text-light-old: #6b7280; /* Keep old light text if needed, or replace */
    --shadow-color: rgba(var(--primary-accent-rgb), 0.1); /* Subtle shadow color */
    --shadow-hover-color: rgba(var(--primary-accent-rgb), 0.2); /* Hover shadow color */
    --accent-color: var(--primary-accent); /* Use primary accent for consistency */
}

/* Global Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; /* Use Inter */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6; /* Add default line-height */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation Placeholder */
#navigation-placeholder {
    min-height: 80px; /* Reserve space for the navigation to prevent layout shifts */
    background: var(--bg-medium); /* Match header background */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Header Styles */
header {
    /* These styles will apply to the header once it's loaded into the placeholder */
    background: var(--bg-medium); /* Darker background */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3); /* Slightly adjusted shadow for dark */
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-color); /* Add subtle border */
}

/* Breadcrumbs Wrapper */
.breadcrumbs-wrapper {
    background: linear-gradient(to right, var(--bg-medium), var(--bg-dark)); /* Match hero section background */
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light); /* Always white */
}

.breadcrumbs a {
    color: var(--text-light); /* Always white */
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--text-light); /* Keep white on hover */
    opacity: 0.7; /* Add a slight opacity change on hover for visual feedback */
}

.breadcrumbs span {
    color: var(--text-light); /* Already white, keep as is */
    font-weight: 500;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-accent); /* Use accent color */
    text-decoration: none;
}

nav {
    margin-left: auto; /* Center nav when space allows */
    margin-right: auto;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-medium); /* Use medium text color */
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-accent); /* Use accent color on hover */
}

/* Dropdown Styles */
.dropdown {
    position: relative; /* Needed for absolute positioning of content */
    padding-bottom: 0.5rem; /* Add padding to keep hover active when moving to menu */
    margin-bottom: -0.5rem; /* Counteract the padding visually if needed */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-medium); /* Dark background */
    min-width: 250px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4); /* Darker shadow */
    z-index: 1;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem; /* Rounded corners */
    /* margin-top: 0.5rem; Removed margin to prevent gap */
    top: 100%; /* Position directly below parent */
    left: 0; /* Align with parent */
    /* padding-top: 0.25rem; Removed this padding */
}

.dropdown-content a {
    color: var(--text-medium); /* Medium text */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--border-color); /* Subtle hover */
    color: var(--text-light); /* Lighter text on hover */
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Language Switcher Styles */
.language-switcher {
    margin-left: 1rem; /* Space from nav */
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Space around the separator */
}

.language-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-medium); /* Medium text */
    text-decoration: none;
    padding: 0.25rem;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.language-link:hover {
    color: var(--primary-accent); /* Accent on hover */
}

.language-link.active {
    color: var(--primary-accent); /* Accent for active */
    text-decoration: underline; /* Use text-decoration for underline */
    font-weight: 500;
}

.flag-icon {
    width: 20px;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(255,255,255,0.2); /* Lighter shadow for dark */
}

.language-separator {
    color: var(--text-medium); /* Medium text */
    opacity: 0.5;
}

/* Hero Section (General) */
.hero {
    background: linear-gradient(to right, var(--bg-medium), var(--bg-dark)); /* Darker gradient */
    color: var(--text-light);
    padding: 5rem 0;
    text-align: center; /* Center align for techy feel */
}

.hero-content { /* Used on index.html */
    max-width: 800px;
    margin: 0 auto; /* Center content */
}

.hero h1, .hero h2 { /* Cover both h1 and h2 used in different heroes */
    font-size: 2.8rem; /* Slightly larger */
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin: 0 auto 2.5rem; /* More space, auto margins for centering */
    max-width: 800px; /* Limit width */
    color: var(--text-medium); /* Use medium text */
    opacity: 1; /* Remove opacity */
}

/* Buttons (General) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Ensure text/icon centering */
    gap: 0.5rem;
    background: var(--primary-accent); /* Accent background */
    color: var(--bg-dark); /* Dark text on button */
    padding: 0.8rem 1.8rem; /* Slightly larger padding */
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600; /* Bolder */
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    border: none; /* Remove border */
    cursor: pointer;
}

.btn:hover {
    background: #93c5fd; /* Lighter accent on hover */
    transform: translateY(-2px); /* Subtle lift */
    box-shadow: 0 4px 10px var(--shadow-hover-color);
}

/* Download Button (Google Play) */
.download-button {
    display: inline-block;
    margin: 1rem 0 2rem;
    transition: transform 0.3s ease;
}

.download-button:hover {
    transform: translateY(-2px);
}

.download-button img {
    height: 60px;
}

/* Services Section (index.html) */
.services {
    padding: 5rem 0;
    background: var(--bg-dark); /* Match body background */
}

.services h2 {
    text-align: center;
    font-size: 2.2rem; /* Slightly larger */
    margin-bottom: 3.5rem; /* More space */
    color: var(--text-light); /* Light text */
    font-weight: 600;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-medium); /* Medium dark background */
    padding: 2rem; /* More padding */
    border-radius: 0.75rem;
    box-shadow: none; /* Remove default shadow */
    border: 1px solid var(--border-color); /* Use border */
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    border-color: var(--primary-accent); /* Highlight border on hover */
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 0 15px var(--shadow-hover-color);
}

.service-card i {
    color: var(--primary-accent); /* Accent color */
    font-size: 1.8rem; /* Larger icon */
    margin-bottom: 1.5rem; /* More space */
}

.service-card h3 {
    color: var(--text-light); /* Light text */
    margin-bottom: 1rem; /* More space */
    font-size: 1.25rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-medium); /* Medium text */
}

/* Apps Section (index.html) */
.apps {
    padding: 5rem 0;
    background: var(--bg-dark); /* Match body background */
}

.apps h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--bg-medium);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden; /* Ensure content fits */
    display: flex; /* Make card a flex container */
    flex-direction: column; /* Stack items vertically */
    padding: 2rem; /* Apply padding to the card itself */
}

.app-card:hover {
    border-color: var(--primary-accent);
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--shadow-hover-color);
}

.app-card-link {
    /* display: block; */ /* No longer needed */
    /* padding: 2rem; */ /* Moved padding to .app-card */
    text-decoration: none;
    color: inherit; /* Inherit text color */
    /* height: 100%; */ /* Removed height */
    display: flex; /* Keep flex for icon/text alignment if needed, or remove if not */
    flex-direction: column; /* Keep column direction */
    flex-grow: 1; /* Allow link content area to grow */
}

.app-card i {
    color: var(--primary-accent);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.app-card h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.app-card p {
    color: var(--text-medium);
    flex-grow: 1; /* Allow paragraph to grow */
    margin-bottom: 1.5rem; /* Space before button */
}

.btn-like { /* Style span to look like a button */
    display: inline-block; /* Or inline-flex if needed */
    align-self: flex-start; /* Align to the start */
    background: var(--primary-accent);
    color: var(--bg-dark);
    padding: 0.6rem 1.2rem; /* Slightly smaller padding */
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s;
    text-align: center;
}

.app-card-link:hover .btn-like {
    background: #93c5fd; /* Lighter accent on hover */
}

.app-card-buttons { /* Container for buttons below the description */
    margin-top: auto; /* Push buttons to the bottom */
    padding-top: 1.5rem; /* Increased space above buttons */
    display: flex;
    align-items: center; /* Align items vertically */
    gap: 1rem; /* Space between buttons */
    flex-wrap: wrap; /* Allow wrapping if needed */
}

.download-button-card img {
    height: 40px; /* Smaller badge for card */
    display: block; /* Remove extra space below image */
    transition: transform 0.2s ease;
}

.download-button-card:hover img {
    transform: scale(1.05); /* Slight scale on hover */
}

/* FAQ Section (index.html) */
.faq {
    padding: 1rem 0;
    background: var(--bg-dark); /* Match body background */
}

.faq h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.faq-item {
    background: var(--bg-medium);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem; /* Space between FAQ items */
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.faq-item:hover {
    border-color: var(--primary-accent);
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--shadow-hover-color);
}

.faq-item h3 {
    color: var(--text-light);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-medium);
}

/* Contact Us Section (index.html) */
.contact-us {
    padding: 5rem 0;
    background: var(--bg-dark); /* Match body background */
    text-align: center;
}

.contact-us h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.contact-us p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-us p a {
    color: var(--text-light); /* Changed to text-light for better visibility */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-us p a:hover {
    color: var(--primary-accent); /* Keep primary-accent for hover */
    text-decoration: underline;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--primary-accent);
    font-size: 2.5rem; /* Larger icons */
    transition: transform 0.3s, color 0.3s;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    color: #93c5fd;
}


/* Features Section (App Pages) */
.features, .app-showcase { /* Combine common section styles */
    padding: 5rem 0;
    background: var(--bg-dark); /* Match body background */
}

.features h2, .app-title { /* Combine common heading styles */
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3.5rem;
    color: var(--text-light);
    font-weight: 600;
}
.app-subtitle { /* Specific to dice_score */
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-medium);
    margin: -2.5rem auto 3rem; /* Adjust spacing */
    max-width: 600px;
}

.features-list, .features-grid { /* Combine grid styles */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Consistent column size */
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Style for Feature Items/Cards */
.feature-item, .feature-card {
    background: var(--bg-medium);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover, .feature-card:hover {
    background-color: var(--bg-light); /* Slightly lighter on hover */
    border-color: var(--primary-accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.feature-item i { /* Specific to important_dates, birthday_reminder */
    color: var(--primary-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-item strong { /* Specific to important_dates, birthday_reminder */
    display: block;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-item p { /* Specific to important_dates, birthday_reminder */
     color: var(--text-medium);
}

.feature-card h2 { /* Specific to dice_score */
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.feature-card ul { /* Specific to dice_score */
    list-style-type: none;
    padding: 0;
}

.feature-card li { /* Specific to dice_score */
    padding: 0.5rem 0;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card li::before { /* Specific to dice_score */
    content: "•";
    color: var(--primary-accent);
    margin-right: 0.5rem; /* Add space */
}

/* Language Support & FAQ Sections (App Pages) */
.language-support, .faq-section {
    text-align: center;
    margin: 3rem auto; /* Center block */
    padding: 2rem;
    background: var(--bg-medium);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    max-width: 800px; /* Limit width */
}

.language-support h3, .faq-section h3 {
     margin-bottom: 1.5rem; /* Adjust spacing */
     color: var(--text-light);
     font-size: 1.5rem;
     font-weight: 600;
}
.language-support p, .faq-section p {
     color: var(--text-medium);
}
.faq-section h4 { /* Specific to birthday_reminder */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Screenshot Gallery */
.screenshot-gallery {
    display: flex; /* Default to flex for important_dates/birthday */
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0; /* Adjust padding */
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.screenshot-gallery img {
    width: auto;
    height: 500px; /* Default height */
    max-width: 250px; /* Default max-width */
    object-fit: contain;
    border-radius: 8px; /* Add slight radius */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2)); /* Darker shadow */
    cursor: pointer; /* Added from gallery.js */
}

.screenshot-gallery img:hover {
    transform: translateY(-5px) scale(1.03); /* Add scale effect */
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3)); /* Darker shadow */
}

/* Dice Score Specific Screenshot Gallery */
.app-showcase .screenshot-gallery { /* Target gallery inside app-showcase */
    display: grid; /* Override to grid */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: none; /* Remove max-width */
    padding: 2rem; /* Restore padding */
}
.app-showcase .screenshot-gallery img {
    width: 100%; /* Override width */
    height: auto; /* Override height */
    border-radius: 1rem; /* Restore radius */
    filter: none; /* Remove filter */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Add shadow */
    cursor: pointer; /* Added from gallery.js */
}
.app-showcase .screenshot-gallery img:hover {
    transform: translateY(-5px); /* Keep lift */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Darker shadow */
    filter: none; /* Ensure no filter on hover */
}

/* CTA Section (dice_score) */
.cta-section {
    text-align: center;
    padding: 4rem 0;
    background: var(--bg-dark); /* Match body */
}
.cta-text {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.download-btn { /* Style specifically for this button if needed, otherwise .btn is fine */
    /* Inherits .btn styles */
}

/* Policy Links/Buttons (App Pages) */
.buttons, .policy-links { /* Combine common container styles */
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 3rem auto;
    text-align: center;
    max-width: 800px;
    flex-wrap: wrap; /* Allow wrapping */
}
.policy-btn { /* Style for policy buttons */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--bg-light); /* Use light dark shade */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    min-width: 150px;
    border: 1px solid var(--border-color);
}
.policy-btn:hover {
    background: var(--border-color);
    color: var(--primary-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--shadow-color);
}

/* Game Code Section (dice_score) */
.game-code-section {
    background: linear-gradient(to right, var(--bg-medium), var(--bg-dark)); /* Use dark gradient */
    color: white;
    padding: 3rem 0;
    text-align: center;
}
.game-code-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}
.game-code-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap; /* Allow wrapping */
}
.game-code-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-light);
    border-radius: 0.5rem;
    width: 100%;
    max-width: 300px; /* Limit width */
    font-size: 1rem;
}
.game-code-input::placeholder {
    color: var(--text-medium);
}
.game-code-button { /* Style like .btn */
    padding: 0.75rem 1.5rem;
    background: var(--primary-accent);
    color: var(--bg-dark);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}
.game-code-button:hover {
    background: #93c5fd;
    transform: translateY(-2px);
}
#scoreList { /* Container for scores */
    margin-top: 2rem;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem; /* More padding */
    min-height: 100px; /* Ensure it has some height */
    color: var(--text-medium); /* Default text color */
}
#scoreList p { /* Style placeholder text */
    color: var(--text-medium);
}

/* Score Display Styles (Loaded into #scoreList) */
.game-data {
    background: transparent; /* Remove background, handled by #scoreList */
    border-radius: 0; /* Remove radius */
    box-shadow: none;
    border: none; /* Remove border */
    overflow: visible; /* Allow overflow */
    margin-top: 0; /* Remove margin */
}
.game-header {
    background: var(--primary-accent);
    color: var(--bg-dark);
    padding: 1rem 1.5rem; /* Adjust padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0.5rem 0.5rem 0 0; /* Round top corners */
}
.game-header h2 {
    margin: 0;
    font-size: 1.25rem; /* Adjust size */
    font-weight: 600;
}
.game-code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}
.score-table-container {
    overflow-x: auto;
    padding: 0; /* Remove padding, handled by #scoreList */
}
.score-table {
    width: 100%;
    border-collapse: collapse;
}
.score-table th,
.score-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}
.score-table th {
    background: var(--bg-light); /* Use lighter dark shade */
    font-weight: 600;
    color: var(--text-medium);
}
.score-table tr:last-child td {
    border-bottom: none;
}
.score-table tbody tr:hover {
    background: var(--bg-light); /* Subtle hover */
}
/* Rank styling */
.rank-first td { color: #4ade80; font-weight: 600; }
.rank-second td { color: var(--text-light); }
.rank-third td { color: #facc15; }

.last-updated {
    padding: 1rem;
    text-align: right;
    color: var(--text-medium);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

/* Loading spinner */
.loading-container {
    text-align: center;
    padding: 2rem;
    color: var(--text-medium);
}
.loading-spinner {
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top: 3px solid var(--primary-accent);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Error message */
.error-message {
    background: #3f1a1a;
    border-left: 4px solid #f87171;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fecaca;
}
.error-message i { font-size: 1.25rem; color: #f87171; }

/* Sitemap Specific Styles */
.sitemap-section {
    padding: 4rem 0;
    background: var(--bg-dark); /* Dark background */
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
}
.sitemap-section h1 { /* Style the h1 inside */
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
}
.sitemap-list {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-medium); /* Card background */
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}
.sitemap-list ul {
    list-style: none;
    padding-left: 0; /* Remove default padding */
}
.sitemap-list li {
    margin: 1rem 0;
    border-bottom: 1px solid var(--border-color); /* Separator */
    padding-bottom: 1rem;
}
.sitemap-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.sitemap-list a {
    color: var(--text-light); /* Light text */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem; /* Increase gap */
    transition: color 0.3s;
    font-size: 1.1rem;
    font-weight: 500; /* Slightly bolder */
}
.sitemap-list a:hover {
    color: var(--primary-accent);
}
.sitemap-list i {
    color: var(--primary-accent);
    font-size: 1rem; /* Slightly larger icon */
    width: 20px; /* Align icons */
    text-align: center;
}
.sitemap-list ul ul { /* Nested list */
    margin-top: 1rem;
    padding-left: 2rem; /* Indent nested list */
    border-left: 2px solid var(--border-color); /* Visual indicator */
}
.sitemap-list ul ul li {
    margin: 0.5rem 0;
    border-bottom: none; /* No separator for sub-items */
    padding-bottom: 0;
}
.sitemap-list ul ul a {
    font-size: 1rem;
    color: var(--text-medium); /* Medium text for sub-items */
    font-weight: 400; /* Normal weight */
}
.sitemap-list ul ul a:hover {
    color: var(--primary-accent);
}
.sitemap-list ul ul i {
    font-size: 0.875rem; /* Smaller icon for sub-items */
    color: var(--text-medium); /* Match text color */
    width: 18px;
}
.sitemap-list ul ul a:hover i {
    color: var(--primary-accent); /* Change icon color on hover */
}

/* Privacy & Terms Page Specific Styles */
.privacy-header, .terms-header {
    background: linear-gradient(to right, var(--bg-medium), var(--bg-dark)); /* Dark gradient */
    color: var(--text-light);
    padding: 4rem 0; /* Increased padding */
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.privacy-header h1, .terms-header h1 {
    font-size: 2.8rem; /* Larger heading */
    margin-bottom: 0.5rem; /* Reduced margin */
    color: var(--text-light);
    font-weight: 700;
}
.privacy-header p, .terms-header p {
    font-size: 1rem; /* Slightly smaller date */
    color: var(--text-medium);
    opacity: 1;
}
.privacy-content, .terms-content {
    max-width: 800px;
    margin: 3rem auto; /* Add margin top/bottom */
    padding: 0 1rem; /* Keep side padding */
    line-height: 1.7; /* Improved line height */
    color: var(--text-light);
}
.privacy-section, .terms-section {
    background: var(--bg-medium);
    padding: 2rem; /* Consistent padding */
    margin-bottom: 2.5rem; /* Increased spacing between sections */
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: all 0.3s ease;
}
.privacy-section:hover, .terms-section:hover {
    border-color: var(--primary-accent);
    transform: translateY(-3px); /* Slightly more lift */
    box-shadow: 0 6px 12px var(--shadow-color); /* Adjusted shadow */
}
.privacy-section h2, .terms-section h2 {
    color: var(--primary-accent);
    font-size: 1.6rem; /* Slightly larger section headings */
    margin-bottom: 1.5rem; /* More space below heading */
    padding-bottom: 0.75rem; /* More padding below border */
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}
.privacy-section p, .terms-section p {
    color: var(--text-light);
    margin-bottom: 1.25rem; /* More space between paragraphs */
}
.privacy-section ul, .terms-section ul {
    list-style: none;
    margin: 1.5rem 0; /* More vertical margin */
    padding-left: 0.5rem; /* Adjust padding */
}
.privacy-section li, .terms-section li {
    margin-bottom: 1rem; /* More space between list items */
    color: var(--text-light);
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 0.75rem; /* Increased gap */
    line-height: 1.6; /* Ensure consistent line height */
}
.privacy-section li::before, .terms-section li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 0.1em; /* Align bullet better with text */
}
.privacy-section strong, .terms-section strong { /* Style bold text within sections */
    color: var(--text-light);
    font-weight: 600;
}
.privacy-section a, .terms-section a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500; /* Slightly bolder links */
}
.privacy-section a:hover, .terms-section a:hover {
    color: #93c5fd;
    text-decoration: underline;
}
.important-notice, .info-box {
    background-color: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem; /* Increased padding */
    margin: 1.5rem 0; /* Increased margin */
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--text-light);
}
.important-notice p, .info-box p {
    color: var(--text-light);
    margin-bottom: 0; /* Remove bottom margin for single paragraphs */
}
.important-notice a, .info-box a {
    color: var(--primary-accent);
    font-weight: 600;
}
.important-notice a:hover, .info-box a:hover {
    color: #93c5fd;
}

/* Footer Placeholder */
#footer-placeholder {
    min-height: 80px; /* Reserve space for the footer */
    background: var(--bg-medium); /* Match footer background */
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Footer */
footer {
    background: var(--bg-medium);
    color: var(--text-medium);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem; /* Ensure space before footer */
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
footer a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: color 0.3s;
}
footer a:hover {
    color: #93c5fd;
}

/* Fullscreen Image Overlay Styles */
#fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer; /* Indicate clicking overlay closes it */
}

#fullscreen-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: block;
    cursor: default; /* Default cursor for the image itself */
}

#fullscreen-overlay button {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1; /* Ensure 'X' fits well */
    text-shadow: 0 0 5px rgba(0,0,0,0.5); /* Add shadow for visibility */
    transition: color 0.2s;
}

#fullscreen-overlay button:hover {
    color: var(--primary-accent);
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        position: relative; /* Ensure dropdown context is okay */
    }
    nav ul {
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    .language-switcher {
         margin-left: 0;
         margin-top: 0.5rem;
         justify-content: center;
    }
    .hero h1, .hero h2 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    .download-button img { height: 50px; }
    .screenshot-gallery { padding: 1rem; } /* General gallery padding */
    .screenshot-gallery img { height: 400px; max-width: 200px; } /* Default responsive */
    .app-showcase .screenshot-gallery { grid-template-columns: 1fr; padding: 1rem; } /* Dice score responsive */
    .app-showcase .screenshot-gallery img { width: 100%; height: auto; } /* Dice score responsive */
    .buttons, .policy-links { flex-direction: column; padding: 0 1rem; }
    .btn, .policy-btn { width: 100%; max-width: 300px; }
    .game-code-form { flex-direction: column; align-items: center; } /* Added align-items: center */
    .footer-content { flex-direction: column; text-align: center; gap: 1.5rem; }
    .sitemap-list ul { padding-left: 1rem; }
    .sitemap-list ul ul { padding-left: 1rem; }
    .privacy-header h1, .terms-header h1 { font-size: 2rem; } /* Responsive policy/terms header */
    .privacy-section, .terms-section { padding: 1.5rem; } /* Responsive policy/terms section */
}

@media (max-width: 640px) { /* Score table specific */
    .game-header { flex-direction: column; gap: 1rem; text-align: center; }
    .score-table th, .score-table td { padding: 0.75rem 0.5rem; font-size: 0.875rem; }
}

@media (max-width: 480px) { /* Smaller screen adjustments */
     .screenshot-gallery img { height: 350px; max-width: 175px; } /* Default responsive */
     .app-showcase .screenshot-gallery img { width: 100%; height: auto; } /* Dice score responsive */
}
