/* Calculator Styles */
.calculator-section {
    padding: 60px 0;
    background: #fff;
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.calculator-header {
    background: #fff;
    color: #333;
    padding: 25px 30px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.calculator-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.calculator-header p {
    margin: 8px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Progress Steps */
.calculator-progress {
    display: flex;
    justify-content: center;
    padding: 25px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.progress-step {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.progress-step .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.progress-step .step-label {
    margin-left: 10px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.progress-step.active .step-number {
    background: #9abc31;
    color: #fff;
}

.progress-step.active .step-label {
    color: #9abc31;
}

.progress-step.completed .step-number {
    background: #28a745;
    color: #fff;
}

/* Calculator Body */
.calculator-body {
    padding: 30px;
}

.calculator-step {
    display: none;
}

.calculator-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* Type Selection */
.type-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.type-option {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    padding: 25px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.type-option:hover {
    border-color: #9abc31;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(154, 188, 49, 0.2);
}

.type-option.selected {
    border-color: #9abc31;
    background: linear-gradient(135deg, rgba(154, 188, 49, 0.1) 0%, rgba(142, 186, 67, 0.05) 100%);
}

.type-option .type-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.type-option .type-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.type-option .type-desc {
    font-size: 13px;
    color: #666;
}

/* Quality Selection in Step */
.quality-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.quality-option {
    padding: 15px 30px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.quality-option:hover {
    border-color: #9abc31;
}

.quality-option.selected {
    border-color: #9abc31;
    background: #9abc31;
    color: #fff;
}

.quality-option .quality-name {
    font-size: 15px;
    font-weight: 600;
}

/* Quality Selection in Results */
.quality-selection-results {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 0 30px;
}

.quality-result-option {
    padding: 12px 30px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.quality-result-option:hover {
    border-color: #9abc31;
}

.quality-result-option.selected {
    border-color: #9abc31;
    background: #9abc31;
    color: #fff;
}

.quality-result-option .quality-name {
    font-size: 14px;
    font-weight: 600;
}

/* Area Input */
.area-input-group {
    max-width: 400px;
    margin: 0 auto;
}

.area-input-wrapper {
    position: relative;
}

.area-input-wrapper input {
    width: 100%;
    padding: 18px 80px 18px 20px;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.area-input-wrapper input:focus {
    outline: none;
    border-color: #9abc31;
    box-shadow: 0 0 0 3px rgba(154, 188, 49, 0.2);
}

.area-input-wrapper .unit {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

.area-hint {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Fraction Selection */
.fraction-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: center;
}

.fraction-option {
    flex: 1;
    min-width: 120px;
    padding: 20px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.fraction-option:hover {
    border-color: #9abc31;
    transform: translateY(-2px);
}

.fraction-option.selected {
    border-color: #9abc31;
    background: linear-gradient(135deg, rgba(154, 188, 49, 0.1) 0%, rgba(142, 186, 67, 0.05) 100%);
}

.fraction-option .fraction-size {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.fraction-option .fraction-layer {
    font-size: 12px;
    color: #666;
}

/* Navigation Buttons */
.calculator-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.calculator-btn {
    padding: 12px 35px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.calculator-btn-prev {
    background: #e9ecef;
    color: #333;
}

.calculator-btn-prev:hover {
    background: #ddd;
}

.calculator-btn-next,
.calculator-btn-calculate {
    background: #9abc31;
    color: #fff;
}

.calculator-btn-next:hover,
.calculator-btn-calculate:hover {
    background: #8eba43;
}

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

/* Results */
.calculator-results {
    display: none;
    padding: 30px;
}

.calculator-results.show {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.result-card {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Loading animation */
.calculator-loading {
    text-align: center;
    padding: 40px;
}

.calculator-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #9abc31;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.calculator-loading p {
    color: #666;
    font-size: 16px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.result-card .result-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.result-card .result-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.result-card .result-unit {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.result-card.highlight {
    background: linear-gradient(135deg, #9abc31 0%, #8eba43 100%);
}

.result-card.highlight .result-label {
    color: rgba(255,255,255,0.9);
}

.result-card.highlight .result-value {
    color: #fff;
}

.result-card.highlight .result-unit {
    color: rgba(255,255,255,0.8);
}

.result-info {
    background: #e8f5e9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.result-info p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.result-info strong {
    color: #9abc31;
}

/* Order Form */
.order-form-section {
    border-top: 1px solid #e9ecef;
    padding-top: 25px;
    margin-top: 25px;
}

.order-form-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.order-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.order-form-row input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.order-form-row input:focus {
    outline: none;
    border-color: #9abc31;
}

.order-submit {
    width: 100%;
    padding: 14px;
    background: #9abc31;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-submit:hover {
    background: #8eba43;
}

/* Order Button in Results */
.order-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #9abc31;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    margin-top: 20px;
}

.order-btn:hover {
    background: #8eba43;
    color: #fff;
}

/* New Calculation Button */
.new-calc-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #9abc31;
    border: 2px solid #9abc31;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.new-calc-btn:hover {
    background: #9abc31;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-section {
        padding: 40px 15px;
    }
    
    .calculator-header h2 {
        font-size: 20px;
    }
    
    .calculator-progress {
        padding: 20px 10px;
    }
    
    .progress-step {
        margin: 0 8px;
    }
    
    .progress-step .step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .progress-step .step-label {
        display: none;
    }
    
    .calculator-body {
        padding: 20px;
    }
    
    .type-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .type-option {
        width: 100%;
        max-width: 100%;
    }
    
    .quality-selection {
        flex-direction: column;
    }
    
    .quality-option {
        width: 100%;
    }
    
    .fraction-grid {
        flex-wrap: wrap;
    }
    
    .fraction-option {
        min-width: calc(50% - 10px);
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .order-form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .fraction-grid {
        grid-template-columns: 1fr;
    }
    
    .area-input-wrapper input {
        font-size: 20px;
        padding: 15px 70px 15px 15px;
    }
    
    .result-card .result-value {
        font-size: 24px;
    }
}