:root {
    --bg-color: #303030;
    --card-bg: #424242;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --primary: #5c6bc0;
    --primary-hover: #7986cb;
    --input-bg: rgba(255, 255, 255, 0.09);
    --input-border: rgba(255, 255, 255, 0.42);
    --input-hover-border: #ffffff;
}

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

body {
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
}

#root {
    display: flex;
    justify-content: center;
    padding-top: 16px;
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 0 16px;
}

.app-header {
    background-color: #424242;
    border-radius: 4px;
    box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 16px;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.0075em;
}

.header-btn {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    padding: 6px 16px;
    font-size: 0.875rem;
    min-width: 64px;
    box-sizing: border-box;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.75;
    text-transform: uppercase;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn,
.header-select {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    padding: 6px 16px;
    font-size: 0.875rem;
    min-width: 64px;
    box-sizing: border-box;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.75;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

.header-select {
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    padding-right: 8px;
    text-transform: none;
}

.header-select option,
.mui-select option {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.header-btn:hover,
.header-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.card {
    background-color: var(--card-bg);
    color: var(--text-primary);
    transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    border-radius: 4px;
    box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
    padding: 32px;
}

.dropdown-group {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

.dropdown-section {
    flex: 1;
    max-width: 300px;
    position: relative;
}

.inputs-section {
    display: flex;
    gap: 32px;
}

.input-container {
    flex: 1;
    position: relative;
    max-width: 300px;
}

.mui-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.00938em;
    padding-left: 12px;
    padding-top: 6px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transform: translate(0, 1.5px) scale(1);
    pointer-events: none;
}

.mui-select,
.mui-input {
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.4375em;
    letter-spacing: 0.00938em;
    color: var(--text-primary);
    box-sizing: border-box;
    cursor: text;
    display: inline-flex;
    align-items: center;
    width: 100%;
    position: relative;
    border-radius: 4px 4px 0 0;
    background-color: var(--input-bg);
    padding: 25px 12px 8px;
    border: none;
    border-bottom: 1px solid var(--input-border);
    outline: none;
    transition: background-color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
}

.mui-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.mui-select:hover,
.mui-input:hover {
    background-color: rgba(255, 255, 255, 0.13);
    border-bottom: 1px solid var(--input-hover-border);
}

.mui-select:focus,
.mui-input:focus {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 7px;
}

/* Custom dropdown arrow for select */
.dropdown-section::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(0);
    pointer-events: none;
}

.rom-info-card h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: modalFadeIn 0.3s forwards;
}

.modal-content {
    max-width: 700px;
    width: 90%;
    transform: translateY(20px);
    animation: modalSlideIn 0.3s forwards;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-sizing: border-box;
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
    margin-bottom: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 8px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
}

@keyframes modalFadeIn {
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    to { transform: translateY(0); }
}

/* Drag and Drop Overlay */
.drop-zone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px dashed var(--accent);
    box-sizing: border-box;
}

.drop-zone-content {
    text-align: center;
    color: var(--text-primary);
    pointer-events: none;
}

.drop-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .dropdown-group, .inputs-section {
        flex-direction: column;
        gap: 16px;
    }
    .dropdown-section, .input-container {
        max-width: 100%;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 20px;
        max-height: 95vh;
    }
    .modal-body {
        font-size: 0.85rem;
    }
}