:root {
    --primary-color: #ff006a;
    --primary-dark: #d4005a;
    --secondary-color: #ff4b93;
    --text-color: #f0f0f0;
    --background-color: #1f1f1f;
    --card-color: #2a2a2a;
    --border-color: #3a3a3a;
    --error-color: #f44336;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 0, 106, 0.5);
}

header p {
    color: var(--text-color);
}

.plugin-note {
    margin-top: 8px;
    font-style: italic;
}

.plugin-note a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.plugin-note a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(255, 0, 106, 0.3);
}

.form-section {
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.form-section h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    background-color: #333;
    color: var(--text-color);
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 0, 106, 0.2);
}

small {
    display: block;
    color: #aaa;
    margin-top: 5px;
}

.checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox-item.incompatible {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-item.incompatible label {
    cursor: not-allowed;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(255, 0, 106, 0.2);
}

button:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(255, 0, 106, 0.4);
    transform: translateY(-2px);
}

#generateButton {
    font-size: 18px;
    padding: 14px 28px;
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 0, 106, 0.3);
}

#generateButton:hover {
    background: var(--secondary-color);
    box-shadow: 0 6px 20px rgba(255, 0, 106, 0.5);
}

#generateButton.loading {
    background: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

#generateButton.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
}

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

.hidden {
    display: none !important;
}

.loading-section {
    text-align: center;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
    box-shadow: 0 0 15px rgba(255, 0, 106, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: var(--error-color);
    font-weight: bold;
    margin: 10px 0;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #aaa;
    text-shadow: 0 0 5px rgba(255, 0, 106, 0.2);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

footer a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(255, 0, 106, 0.3);
}

/* Layout styles */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    grid-template-areas:
        "properties versions"
        "properties loaders"
        "properties actions";
}

.mod-properties {
    grid-area: properties;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.minecraft-versions {
    grid-area: versions;
}

.mod-loaders {
    grid-area: loaders;
}

.form-actions {
    grid-area: actions;
    margin-top: 0 !important;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-select {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-select:after {
    content: '▼';
    font-size: 12px;
    margin-left: 10px;
}

.dropdown-menu {
    position: fixed;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    background-color: #333;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #444;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #444;
    border-radius: 0 0 4px 0;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    position: relative;
}

.dropdown-item:hover {
    background-color: #444;
}

.dropdown-item.selected {
    background-color: rgba(255, 0, 106, 0.2);
}

.dropdown-item.selected:hover {
    background-color: rgba(255, 0, 106, 0.3);
}

.dropdown-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.dropdown-item::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid #666;
    border-radius: 3px;
    transition: all 0.2s;
}

.dropdown-item.selected::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='18px' height='18px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.selected-options {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.selected-option {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.selected-option span {
    margin-right: 5px;
}

.selected-option button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
    box-shadow: none;
}

.selected-option button:hover {
    color: #ffccdd;
    box-shadow: none;
    transform: none;
}

/* Success message */
.success-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(255, 0, 106, 0.4);
    z-index: 1000;
    animation: slide-up 0.5s ease-out;
    font-weight: 600;
}

.success-message.fade-out {
    animation: fade-out 0.5s ease-out forwards;
}

@keyframes slide-up {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .form-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "properties"
            "versions"
            "loaders"
            "actions";
    }

    .checkbox-container {
        grid-template-columns: 1fr;
    }

    .form-actions {
        text-align: center;
    }
}
