:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --dark: #1e1b4b;
    --dark-light: #312e81;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 50%, #1e3a5f 100%);
    min-height: 100vh;
    color: var(--gray-100);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--gray-400);
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title .icon {
    font-size: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--gray-100);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: inherit;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

select option {
    background: var(--gray-800);
    color: var(--gray-100);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-200);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Categories Container */
.categories-container {
    display: none;
}

.categories-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Technology Options */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.tech-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tech-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
}

.tech-option.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

.tech-option input[type="checkbox"],
.tech-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.tech-option .tech-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.tech-option .recommended {
    font-size: 0.7rem;
    background: var(--accent);
    color: var(--gray-900);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Category Section */
.category-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-200);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title .required {
    font-size: 0.7rem;
    background: var(--danger);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Output Section */
.output-section {
    display: none;
}

.output-section.active {
    display: block;
}

.output-preview {
    background: var(--gray-900);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.output-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Platform Cards */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.platform-card {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.platform-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.platform-card.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

.platform-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.platform-card .name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Presets */
.preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.preset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.preset-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

/* Admin Link */
.admin-link {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.admin-link:hover {
    color: var(--gray-200);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    background: var(--secondary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Steps Indicator */
.steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-weight: 500;
}

.step.active {
    color: var(--primary-light);
}

.step.completed {
    color: var(--secondary);
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

.step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step.completed .step-number {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

/* Compatibility Alerts */
.compatibility-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.compatibility-alert.warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.compatibility-alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.compatibility-alert.warning .alert-title {
    color: #f87171;
}

.compatibility-alert.success .alert-title {
    color: #34d399;
}

.alert-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert-body li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--gray-300);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.alert-body li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.alert-body li strong {
    color: var(--gray-100);
}

#compatibilityAlerts {
    margin-bottom: 1.5rem;
}