/* Mining Rig Builder Specific Styles */

.mining-rig-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 40px 0;
}

.mining-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.mining-builder-container {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gpu-selector {
    margin-bottom: 20px;
}

.gpu-config-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.gpu-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.gpu-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.gpu-card h4 {
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gpu-card h4 i {
    color: #007bff;
}

.gpu-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Results Section */
.results-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.result-tab {
    padding: 12px 25px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.result-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.result-tab:hover {
    color: #007bff;
}

.result-tab-content {
    display: none;
}

.result-tab-content.active {
    display: block;
}

.profitability-notice {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.result-value.profit {
    color: #28a745;
}

.result-value.profit.negative {
    color: #dc3545;
}

.component-list {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.component-item:last-child {
    border-bottom: none;
}

.component-name {
    font-weight: 500;
}

.component-power {
    color: #ffd700;
    font-weight: 600;
}

/* Mining Information */
.mining-info {
    margin-top: 40px;
}

.mining-info .info-card ul {
    list-style: none;
    padding: 0;
}

.mining-info .info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 20px;
}

.mining-info .info-card li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.mining-info .info-card li:last-child {
    border-bottom: none;
}

/* GPU Selection Animations */
.gpu-card {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mining-builder-container {
        padding: 25px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .gpu-form-grid {
        grid-template-columns: 1fr;
    }
    
    .results-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .result-tab {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .mining-info .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Power efficiency indicators */
.efficiency-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 10px;
}

.efficiency-indicator.high {
    background: #d4edda;
    color: #155724;
}

.efficiency-indicator.medium {
    background: #fff3cd;
    color: #856404;
}

.efficiency-indicator.low {
    background: #f8d7da;
    color: #721c24;
}

/* GPU power limit slider styling */
.power-limit-display {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #007bff;
}

/* Advanced mining settings */
.advanced-settings {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.advanced-settings h4 {
    color: #495057;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advanced-settings h4:hover {
    color: #007bff;
}

.collapsible-content {
    display: none;
    margin-top: 15px;
}

.collapsible-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Power Supply Calculator Specific Styles - Exact Copy */

.calculator-page {
    background: #fff;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    padding: 20px 0 30px;
    border-bottom: 1px solid #e5e5e5;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 400;
}

.calculator-intro {
    margin-bottom: 25px;
}

.calculator-intro h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.calculator-intro p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.calculator-intro a {
    color: #337ab7;
    text-decoration: none;
}

.calculator-intro a:hover {
    text-decoration: underline;
}

/* Calculator Type Selector */
.calculator-type-selector {
    margin-bottom: 30px;
}

.type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 20px;
    border: 1px solid #ccc;
    background: #f8f8f8;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 0;
}

.tab-btn.active {
    background: #337ab7;
    color: #fff;
    border-color: #337ab7;
}

.tab-btn:hover {
    background: #337ab7;
    color: #fff;
    border-color: #337ab7;
}

/* Calculator Container */
.calculator-container {
    background: #fff;
    padding: 0;
}

.calculator-form {
    display: none;
}

.calculator-form.active {
    display: block;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Form Sections */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-section label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-section select,
.form-section input {
    padding: 6px 8px;
    border: 1px solid #ccc;
    font-size: 13px;
    background: #fff;
    color: #333;
    border-radius: 0;
}

.form-section select:focus,
.form-section input:focus {
    outline: none;
    border-color: #66afe9;
    box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
}

/* CPU Controls */
.cpu-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cpu-controls select {
    width: 60px;
}

.multiplier {
    font-weight: bold;
    color: #333;
}

.cpu-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.input-with-unit {
    display: flex;
    align-items: center;
}

.input-with-unit input {
    flex: 1;
    margin-right: 5px;
}

.unit {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Memory Controls */
.memory-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.memory-controls select:first-child {
    width: 60px;
}

.memory-controls select:last-child {
    flex: 1;
}

.fb-dimms {
    margin-top: 15px;
}

.fb-dimms label {
    font-size: 13px;
    margin-bottom: 5px;
}

/* Video Card Controls */
.video-cards-container {
    margin-top: 15px;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.video-controls select:first-child {
    width: 60px;
}

.video-controls select:last-child {
    flex: 1;
}

.video-controls small {
    color: #666;
    font-style: italic;
}

/* Storage Controls */
.storage-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.storage-controls select:first-child {
    width: 60px;
}

.storage-controls select:last-child {
    flex: 1;
}

.storage-controls small {
    color: #666;
    font-style: italic;
}

/* Optical Drives */
.optical-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.optical-controls select:first-child {
    width: 60px;
}

.optical-controls select:last-child {
    flex: 1;
}

/* Monitor Controls */
.monitor-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.monitor-controls select:first-child {
    width: 60px;
}

.monitor-controls select:last-child {
    flex: 1;
}

/* Usage Time Controls */
.usage-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.usage-controls select:first-child {
    width: 60px;
}

.usage-controls select:last-child {
    flex: 1;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}

/* Button Styles - Exact Copy from Original */
.btn {
    margin: 5px;
    display: inline-block;
    vertical-align: top;
    letter-spacing: 0;
    font-size: 14px;
    line-height: 18px;
    padding: 10px 22px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    border-radius: 24px !important;
    border: 0;
    outline: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calculate {
    color: #fff;
    background: #0088cf;
    margin-right: 10px;
}

.btn-calculate:hover {
    background: #0170DE;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,136,207,0.3);
}

.btn-reset {
    color: #fff;
    background: #ff7301;
    margin-left: 10px;
}

.btn-reset:hover {
    background: #ff3d01;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,115,1,0.3);
}

/* Results Section */
.results-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.results-section h3 {
    text-align: center;
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 30px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-card h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 10px;
}

.result-value.recommended {
    color: #28a745;
}

.result-value.profit {
    color: #28a745;
}

.result-card p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* PSU Recommendation Section */
.psu-recommendation-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid #28a745;
    margin-top: 30px;
}

.psu-recommendation-section h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.psu-recommendation-section p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* Small elements */
small {
    font-size: 11px;
    color: #777;
    font-style: italic;
    margin-top: 3px;
    display: block;
    line-height: 1.3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .cpu-controls,
    .memory-controls,
    .video-controls,
    .storage-controls,
    .optical-controls,
    .monitor-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .cpu-controls select,
    .memory-controls select,
    .video-controls select,
    .storage-controls select,
    .optical-controls select,
    .monitor-controls select {
        width: 100%;
    }
    
    .multiplier {
        text-align: center;
        padding: 5px 0;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .type-tabs {
        justify-content: center;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .page-header {
        padding: 15px 0 20px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .calculator-intro h2 {
        font-size: 16px;
    }
    
    .tab-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn.loading {
    background: #ccc;
    cursor: not-allowed;
}

/* Error states */
.error {
    border-color: #d9534f !important;
    box-shadow: 0 0 5px rgba(217, 83, 79, 0.3) !important;
}

/* Success states */
.success {
    border-color: #5cb85c !important;
    box-shadow: 0 0 5px rgba(92, 184, 92, 0.3) !important;
}
