:root {
    --primary: #0061ff;
    --primary-light: #60efff;
    --secondary: #64748b;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: white;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.sidebar-logo i {
    color: var(--primary-light);
    font-size: 28px;
}

.sidebar-logo span span {
    color: var(--primary-light);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-nav a.active {
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 97, 255, 0.3);
}

.nav-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-brief {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-info {
    font-size: 13px;
    line-height: 1.4;
}

.user-info .name {
    display: block;
    font-weight: 600;
}

.user-info .role {
    color: #94a3b8;
    font-size: 11px;
}

.logout-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    max-width: 1400px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.header-title h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

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

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-reset, .btn-save, .btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border: none;
}

.btn-reset {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-reset:hover {
    background-color: var(--bg-main);
}

.btn-save, .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 97, 255, 0.2);
}

.btn-save:hover, .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-save:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

/* Build Grid Overlay */
.build-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

.section-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header h2, .card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i, .card-header h3 i {
    color: var(--primary);
}

.badge {
    background-color: #f1f5f9;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* Components List Slots */
.components-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.component-slot {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s;
}

.component-slot:hover {
    border-color: var(--primary);
}

.component-slot.filled {
    background: white;
    box-shadow: var(--shadow-sm);
}

.part-icon-wrap {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid var(--border);
}

.part-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.part-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.part-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.part-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 450px;
}

.part-empty-text {
    font-size: 14px;
    color: #94a3b8;
    font-style: italic;
}

.part-actions {
    display: flex;
    gap: 10px;
}

.btn-select-part, .btn-action {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-remove-part {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    background: #fef2f2;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remove-part:hover {
    background: var(--danger);
    color: white;
}

/* Analysis Side */
.analysis-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 40px;
}

.analysis-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.status-card {
    display: flex;
    gap: 16px;
    border-left: 6px solid var(--border);
}

.status-card.neutral { border-left-color: var(--secondary); }
.status-card.success { border-left-color: var(--success); }
.status-card.warning { border-left-color: var(--accent); }
.status-card.error { border-left-color: var(--danger); }

.status-icon {
    font-size: 24px;
    margin-top: 2px;
}

.status-card.neutral .status-icon { color: var(--secondary); }
.status-card.success .status-icon { color: var(--success); }
.status-card.warning .status-icon { color: var(--accent); }
.status-card.error .status-icon { color: var(--danger); }

.status-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.status-content p {
    font-size: 13px;
    color: var(--text-muted);
}

.psu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-sidebar);
    color: white;
    border: none;
}

.psu-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-light);
}

.psu-content .label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.psu-content .value {
    font-size: 20px;
    font-weight: 800;
}

.bottleneck-card .card-header { margin-bottom: 16px; }

.res-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.res-item {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.res-item span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.res-item strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.bottleneck-msg {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.empty-placeholder {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    padding: 20px;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
}

.btn-mini {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.game-card .selected-game {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.selected-game img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-info span:first-child {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.game-info span:last-child {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-icon {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
}

.issues-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.issue-box {
    padding: 16px;
    border-radius: 10px;
}

.issue-box.error { background: #fef2f2; border: 1px solid #fee2e2; color: #b91c1c; }
.issue-box.warning { background: #fffbeb; border: 1px solid #fef3c7; color: #b45309; }

.issue-box h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.issue-box ul {
    list-style: none;
    font-size: 13px;
    padding-left: 22px;
}

.issue-box li { position: relative; margin-bottom: 6px; }
.issue-box li::before {
    content: "•";
    position: absolute;
    left: -14px;
}

/* Multi-Game Selected List */
.selected-games-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.empty-games-placeholder {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    font-style: italic;
}

.selected-game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.2s;
}

.selected-game-item img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.selected-game-item .game-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-game-item .game-status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

.fps-multi-wrap {
    display: flex;
    gap: 4px;
    align-items: center;
}

.fps-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 38px;
    border: 1px solid #e2e8f0;
}

.fps-tag .label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.fps-tag .value {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.fps-tag.high { background: #e0e7ff; }
.fps-tag.high .value { color: #4338ca; }
.fps-tag.med { background: #fef3c7; }
.fps-tag.med .value { color: #92400e; }
.fps-tag.low { background: #dcfce7; }
.fps-tag.low .value { color: #166534; }

.selected-game-item .remove-game {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    padding: 4px;
}

.selected-game-item .remove-game:hover { color: var(--danger); }

/* Resolution Selector */
.resolution-selector-sidebar {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.res-options-flex {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.res-radio {
    flex: 1;
    cursor: pointer;
}

.res-radio input {
    display: none;
}

.res-radio span {
    display: block;
    text-align: center;
    padding: 6px;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.res-radio input:checked + span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Game Picker Enhancements */
.game-card-mini {
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}

.game-card-mini:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.game-checkbox-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 2;
}

.game-checkbox-overlay.active {
    background: var(--primary);
    border-color: var(--primary);
}

.game-checkbox-overlay i {
    font-size: 12px;
    display: none;
}

.game-checkbox-overlay.active i {
    display: block;
}

/* Game Picker Modal Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.game-card-mini {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card-mini img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.game-card-mini .game-name-label {
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-content.sm { max-width: 500px; }
.modal-content.lg { max-width: 1100px; }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.search-bar {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    font-size: 15px;
    outline: none;
}

.picker-items {
    padding: 24px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    max-height: 480px;
}

.picker-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 24px;
    background: white;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}

.filter-group label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.filter-group select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}

.filter-group select:focus {
    border-color: var(--primary);
    background: white;
}

.part-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.part-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.part-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.part-card-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 40px;
}

.part-card-specs {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    height: 18px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-footer-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.flex-1 { flex: 1; }

/* Enhanced Item Detail Modal Layout - 3 Columns */
.item-details-layout {
    display: grid;
    grid-template-columns: 260px 1.2fr 1fr;
    gap: 32px;
    align-items: flex-start;
}

.item-visual-col {
    position: sticky;
    top: 0;
}

.item-image-wrapper {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.item-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-info-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.item-badge-cat {
    display: inline-block;
    padding: 6px 12px;
    background: #ebf4ff;
    color: var(--primary);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.item-name-heading {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.2;
}

.item-desc-section {
    background: #fdfdfd;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.mini-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-desc-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    white-space: pre-wrap;
}

.item-specs-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.specs-heading {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.item-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
}

.spec-item-box {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.spec-item-box:hover {
    background: white;
    border-color: var(--primary);
}

.spec-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.pagination {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-circle:disabled { opacity: 0.5; cursor: not-allowed; }

/* Detail View */
.modal-body { padding: 24px; }
.detail-body { padding: 32px; overflow-y: auto; }

.detail-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* Detail Header & Back Button Styles */
.detail-header {
    padding: 16px 32px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-back:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: white;
    transform: translateX(-4px);
}

.btn-back i {
    font-size: 14px;
    color: var(--primary);
}

/* Utils */
.w-100 { width: 100%; }
.mb-2 { margin-bottom: 8px; }
.mt-2 { margin-top: 8px; }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* Responsive */
@media (max-width: 1100px) {
    .build-grid { grid-template-columns: 1fr; }
    .analysis-section { position: static; }
}

@media (max-width: 768px) {
    .sidebar { width: 0; padding: 0; overflow: hidden; }
    .main-content { margin-left: 0; padding: 20px; }
    .component-slot { grid-template-columns: 60px 1fr; }
    .part-actions { grid-column: 1 / -1; margin-top: 10px; width: 100%; }
    .btn-select-part { width: 100%; }
}/* Premium Modal Styles */
.premium-modal {
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-body-premium {
    padding: 32px;
}

.header-with-icon {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.build-preview-banner {
    background: #f0f7ff;
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid #dbeafe;
}

.premium-form-group {
    margin-bottom: 24px;
}

.premium-form-group .form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #475569;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 14px;
}

.input-with-icon input, 
.input-with-icon textarea {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-with-icon.align-top i {
    top: 16px;
}

.input-with-icon input:focus, 
.input-with-icon textarea:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.modal-action-footer {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.required {
    color: var(--danger);
    margin-left: 2px;
}

.flex-2 { flex: 2; }/* Game Results Modal Premium Style */
.build-summary-brief {
    display: flex;
    gap: 16px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.summary-spec-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.summary-spec-card .label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-spec-card .value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    max-height: 520px;
    overflow-y: auto;
    padding: 16px 24px;
}

.game-res-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    transition: all 0.2s;
}

.game-res-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.game-res-card img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.game-res-info {
    flex: 1;
    min-width: 0;
}

.game-res-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-res-detail {
    font-size: 11px;
    color: var(--text-muted);
}

.status-tag {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-tag.recommended {
    background: #dcfce7;
    color: #166534;
}

.status-tag.minimum {
    background: #fef3c7;
    color: #92400e;
}

.status-tag.incompatible {
    background: #fee2e2;
    color: #991b1b;
}
