/* PC Builder Styles */

.pc-builder {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2b 50%, #252d3d 100%);
    padding: 2rem 0;
}

/* Builder Header */
.builder-header {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.builder-header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #00d4ff, #0099cc, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.builder-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

/* Compatibility Score */
.compatibility-score {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #00d4ff 0%, #00d4ff var(--score-percent), rgba(255, 255, 255, 0.1) var(--score-percent), rgba(255, 255, 255, 0.1) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    background: #1a1f2b;
    border-radius: 50%;
    z-index: 1;
}

.score-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    z-index: 2;
    position: relative;
}

.score-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    position: relative;
}

.score-info h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.score-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Builder Layout */
.builder-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Build Sidebar */
.build-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.build-summary {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.build-summary h3 {
    color: #00d4ff;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Build Components */
.build-components {
    margin-bottom: 2rem;
}

.build-component {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    min-height: 80px;
}

.build-component.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.build-component.empty {
    background: rgba(255, 255, 255, 0.02);
    border-style: dashed;
}

.component-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.build-component.selected .component-icon {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
}

.build-component.empty .component-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.component-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.component-image-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.component-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.component-details h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.component-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.component-price {
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.9rem;
}

.component-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.select-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid #00d4ff;
    color: #00d4ff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-btn:hover {
    background: #00d4ff;
    color: #1a1f2b;
}

.remove-btn {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #e74c3c;
    color: #ffffff;
}

/* Build Total */
.build-total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.total-price {
    text-align: center;
    margin-bottom: 1.5rem;
}

.total-price span {
    font-size: 1.5rem;
    color: #ffffff;
}

.total-price strong {
    color: #00d4ff;
    font-size: 1.8rem;
}

.build-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.build-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px;
}

/* Compatibility Alerts */
.compatibility-alerts {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.compatibility-alerts h3 {
    color: #f39c12;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compatibility-alerts h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    margin-top: 1rem;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: #f39c12;
}

.alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Component Selection */
.component-selection {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    position: relative;
}

.tab-btn:hover,
.tab-btn.active {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
    border-color: #00d4ff;
}

.selected-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #2ecc71;
    color: #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Component Grids */
.component-grid {
    padding: 2rem;
}

.recommendations-section {
    margin-bottom: 3rem;
}

.recommendations-section h3 {
    color: #00d4ff;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.all-components-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Component Cards */
.component-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.component-card.recommended {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.05);
}

.component-card.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

.recommendation-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #1a1f2b;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.component-image {
    height: 150px;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.component-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.component-card:hover .component-image img {
    transform: scale(1.05);
}

.component-info h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.component-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.component-specs {
    margin-bottom: 1rem;
}

.stock-status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.stock-status.in-stock {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.stock-status.low-stock {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.component-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 1rem;
}

.component-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.component-actions .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.component-actions .btn-sm {
    flex: none;
    min-width: auto;
    padding: 6px 10px;
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
    border: 1px solid #2ecc71;
}

.btn-success:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .builder-layout {
        grid-template-columns: 300px 1fr;
        gap: 1.5rem;
    }

    .compatibility-score {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 1024px) {
    .builder-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .build-sidebar {
        position: relative;
        top: auto;
        max-height: none;
        order: 2;
    }

    .component-selection {
        order: 1;
    }

    .recommendation-grid,
    .components-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .pc-builder {
        padding: 1rem 0;
    }

    .builder-header h1 {
        font-size: 2.5rem;
    }

    .builder-header {
        margin-bottom: 2rem;
    }

    .compatibility-score {
        padding: 1.5rem;
    }

    .score-circle {
        width: 100px;
        height: 100px;
    }

    .score-circle::before {
        width: 75px;
        height: 75px;
    }

    .score-number {
        font-size: 1.5rem;
    }

    .build-summary,
    .compatibility-alerts {
        padding: 1.5rem;
    }

    .component-grid {
        padding: 1.5rem;
    }

    .category-tabs {
        padding: 1rem;
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .tab-btn span {
        display: none;
    }

    .recommendation-grid,
    .components-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }

    .component-card {
        padding: 1rem;
    }

    .component-image {
        height: 120px;
    }

    .component-actions {
        flex-direction: column;
    }

    .component-actions .btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .builder-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .recommendation-grid,
    .components-grid {
        grid-template-columns: 1fr;
    }

    .build-component {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .component-details {
        width: 100%;
    }

    .compatibility-score {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Custom Scrollbar */
.build-sidebar::-webkit-scrollbar {
    width: 6px;
}

.build-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.build-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 3px;
}

.build-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.component-card {
    animation: fadeIn 0.4s ease forwards;
}

.component-card:nth-child(even) {
    animation-delay: 0.1s;
}

.component-card:nth-child(3n) {
    animation-delay: 0.2s;
} 