/* General Body Styles - Modern Beige Background */
body {
    font-family: 'Poppins', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* Modern font, Poppins is good if linked */
    margin: 0;
    padding: 0;
    background-color: #f8f0e3; /* Soft light beige */
    color: #362e2c; /* Dark brown/black text */
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 50px; /* More space from top */
    box-sizing: border-box;
    transition: background-color 0.5s ease, color 0.5s ease; /* Smooth transition for dark/light mode */
    position: relative; /* For absolute positioning of toggle */
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a; /* Dark black background */
    color: #f0f0f0; /* Light white text */
}

body.dark-mode .container {
    background-color: rgba(0, 0, 0, 0.3); /* Darker semi-transparent for glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Lighter border for contrast */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

body.dark-mode h1 {
    color: #e0b26c; /* Brighter brown/gold for dark mode heading */
}

body.dark-mode .version-selector label {
    color: #d0d0d0;
}

body.dark-mode .version-selector select {
    background-color: rgba(0, 0, 0, 0.4);
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.3);
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23f0f0f0%22%20d%3D%22M287%20176.7L146.2%2036.9a8.9%208.9%200%2000-12.6%200L5.4%20176.7c-4.5%204.5-4.5%2011.7%200%2016.2s11.7%204.5%2016.2%200l124.9-124.9L270.8%20192.9c4.5%204.5%2011.7%204.5%2016.2%200s4.5-11.7%200-16.2z%22%2F%3E%3C%2Fsvg%3E'); /* Light arrow for dark mode select */
}

body.dark-mode .version-selector select:hover {
    border-color: #e0b26c;
    box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.1), 0 0 12px rgba(224, 178, 108, 0.2);
}

body.dark-mode .version-selector select:focus {
    border-color: #e0b26c;
    box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.2), 0 0 15px rgba(224, 178, 108, 0.4);
}

body.dark-mode .mod-list {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .mod-list p {
    color: #b0b0b0;
}

body.dark-mode .mod-item {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.dark-mode .mod-item:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode .mod-item:hover {
    background-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .mod-name {
    color: #e0b26c; /* Brighter brown for mod names in dark mode */
}

/* AIO Indicator removed */
/* .aio-indicator { } */ 

body.dark-mode .mod-link-button {
    background: #6a4a2f; /* Darker brown for buttons in dark mode */
    color: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .mod-link-button:hover {
    background: #7b5b3f; /* Slightly lighter on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

body.dark-mode .aio-button {
    background: #b08c4e; /* Gold-brown for AIO in dark mode */
}

body.dark-mode .aio-button:hover {
    background: #c09c5e;
}

body.dark-mode .info-button {
    background: #4a4a4a; /* Dark grey for info in dark mode */
    color: #f0f0f0;
}

body.dark-mode .info-button:hover {
    background: #5a5a5a;
}

body.dark-mode .mod-unavailable .mod-name {
    color: #707070; /* Greyer for unavailable in dark mode */
}

body.dark-mode .mod-version {
    color: #a0a0a0; /* Lighter grey for version in dark mode */
}


/* Main Container - Glass Effect */
.container {
    width: 90%;
    max-width: 960px;
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for glass effect */
    padding: 40px;
    border-radius: 20px; /* More rounded corners */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); /* Stronger, diffused shadow */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle, light border for glass effect */
    backdrop-filter: blur(10px); /* The magic glass effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari support */
    animation: fadeIn 0.8s ease-out;
    transition: background-color 0.5s ease, border 0.5s ease, box-shadow 0.5s ease; /* Smooth transition for dark/light mode */
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Heading - Bright Brown */
h1 {
    text-align: center;
    color: #8B4513; /* Saddle Brown - a bright brown */
    font-size: 2.8em; /* Larger heading */
    margin-bottom: 45px;
    font-weight: 700; /* Bolder */
    letter-spacing: 1px;
    transition: color 0.5s ease; /* Smooth transition for dark/light mode */
}

/* Version Selector Section */
.version-selector {
    text-align: center;
    margin-bottom: 45px;
}

.version-selector label {
    font-size: 1.2em;
    margin-right: 15px;
    color: #5a4b46; /* Slightly lighter dark brown */
    font-weight: 500;
    transition: color 0.5s ease; /* Smooth transition for dark/light mode */
}

.version-selector select {
    padding: 14px 25px;
    border-radius: 10px; /* Consistent rounded corners */
    border: 1px solid rgba(139, 69, 19, 0.5); /* Brownish border */
    background-color: rgba(255, 255, 255, 0.15); /* Semi-transparent white */
    color: #362e2c; /* Dark text */
    font-size: 1.05em;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23362e2c%22%20d%3D%22M287%20176.7L146.2%2036.9a8.9%208.9%200%2000-12.6%200L5.4%20176.7c-4.5%204.5-4.5%2011.7%200%2016.2s11.7%204.5%2016.2%200l124.9-124.9L270.8%20192.9c4.5%204.5%2011.7%204.5%2016.2%200s4.5-11.7%200-16.2z%22%2F%3E%3C%2Fsvg%3E'); /* Darker arrow */
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 14px;
    min-width: 180px;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.version-selector select:hover {
    border-color: #A0522D; /* Sienna brown on hover */
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 0 12px rgba(139, 69, 19, 0.2);
}

.version-selector select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.2), 0 0 15px rgba(139, 69, 19, 0.4);
}

/* Mod List Area */
.mod-list {
    background-color: rgba(255, 255, 255, 0.05); /* Very transparent white */
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s ease, border 0.5s ease, box-shadow 0.5s ease; /* Smooth transition */
}

.mod-list p {
    text-align: center;
    color: #5a4b46;
    font-style: italic;
    transition: color 0.5s ease; /* Smooth transition */
}

/* Individual Mod Item - Better Separation */
.mod-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px; /* More space between items */
    padding: 18px 25px; /* More internal padding */
    background-color: rgba(255, 255, 255, 0.08); /* Slightly visible background for each item */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, border 0.3s ease; /* Added border for transition */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Very subtle internal border */
}

/* Alternating background for better visual separation */
.mod-item:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.mod-item:hover {
    background-color: rgba(255, 255, 255, 0.15); /* More prominent on hover */
    transform: translateY(-3px); /* Noticeable lift */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.mod-item:last-child {
    margin-bottom: 0;
    padding-bottom: 18px; /* Maintain padding at the bottom for the last item */
}

.mod-name {
    flex: 1 1 55%;
    font-weight: 600;
    color: #8B4513; /* Bright brown for mod names */
    font-size: 1.1em;
    margin-right: 15px;
    display: flex; /* For AIO indicator alignment (if re-added) */
    align-items: center;
    transition: color 0.5s ease; /* Smooth transition */
}

/* AIO Indicator is removed per request */
/* .aio-indicator {
    background-color: #CD853F;
    color: white;
    font-size: 0.7em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    margin-left: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
} */

.mod-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px; /* More space between buttons */
    margin-right: 20px;
    flex: 0 0 auto;
}

.mod-link-button {
    background: #A0522D; /* Sienna brown for primary button */
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px; /* More rounded */
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-width: 120px; /* Ensure consistent button size */
}

.mod-link-button:hover {
    background: #8B4513; /* Darker brown on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.mod-link-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Specific styles for AIO button */
.aio-button {
    background: #CD853F; /* Peru (brown-orange) */
}

.aio-button:hover {
    background: #D2691E; /* Chocolate (darker orange) */
}

/* Specific styles for Info/README button */
.info-button {
    background: #5a4b46; /* Darker brown */
    color: #f8f0e3; /* Light text for dark button */
}

.info-button:hover {
    background: #362e2c; /* Even darker brown */
}

/* Style for unavailable mods */
.mod-unavailable .mod-name {
    text-decoration: line-through;
    color: #9a8c88; /* Greyed out brown */
    font-style: italic;
    transition: color 0.5s ease; /* Smooth transition */
}

.mod-unavailable .mod-link-button {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.mod-version {
    flex: 0 0 auto;
    font-style: italic;
    color: #5a4b46; /* Slightly lighter dark brown */
    font-size: 0.95em;
    white-space: nowrap;
    margin-left: auto; /* Push version to the right */
    transition: color 0.5s ease; /* Smooth transition */
}


/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.2); /* Light semi-transparent */
    color: #362e2c; /* Dark text */
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 15px;
    border-radius: 25px; /* Pill shape */
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    z-index: 1000; /* Ensure it stays on top */
}

.dark-mode-toggle .icon {
    font-size: 1.2em;
    line-height: 1; /* Align icon vertically */
}

.dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Dark mode specific toggle button styles */
body.dark-mode .dark-mode-toggle {
    background-color: rgba(0, 0, 0, 0.4); /* Dark semi-transparent */
    color: #f0f0f0; /* Light text */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 30px 15px;
    }

    .container {
        padding: 30px;
        width: 95%;
    }

    h1 {
        font-size: 2.2em;
        margin-bottom: 35px;
    }

    .version-selector label {
        display: block;
        margin-bottom: 12px;
        margin-right: 0;
    }

    .version-selector select {
        width: 100%;
        min-width: unset;
        padding: 12px 20px;
    }

    .mod-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        margin-bottom: 15px;
    }

    .mod-name {
        flex-basis: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 1em; /* Adjust font size */
    }
    
    .mod-links-container {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .mod-link-button {
        width: 100%;
        padding: 12px 18px;
    }

    .mod-version {
        flex-basis: 100%;
        text-align: left;
        margin-left: 0; /* Align version to the left when stacked */
        font-size: 0.9em;
    }

    /* Adjust toggle position for smaller screens */
    .dark-mode-toggle {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 0.85em;
        gap: 6px;
    }
    .dark-mode-toggle .icon {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .mod-item {
        padding: 12px 15px;
        font-size: 0.95em;
    }
}
