/* Stock Average Calculator Styles */

.calculator-section {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-container {
    display: grid;
    gap: 25px;
}

.input-panel, .result-panel {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.input-panel h2, .result-panel h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-with-unit input:focus {
    outline: none;
    border-color: #4a90e2;
}

.input-with-unit .unit {
    color: #666;
    font-weight: 500;
    min-width: 30px;
}

.total-investment {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 8px;
    font-weight: 600;
    color: #2c5aa0;
    margin-top: 15px;
}

/* Additional Purchases */
.purchase-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.purchase-row .form-group {
    margin-bottom: 0;
}

.btn-remove {
    width: 40px;
    height: 40px;
    border: none;
    background: #ff6b6b;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #ee5a5a;
}

.btn-add-row {
    width: 100%;
    padding: 12px;
    border: 2px dashed #4a90e2;
    background: transparent;
    color: #4a90e2;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-add-row:hover {
    background: #f0f7ff;
}

/* Result Panel */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.result-card.primary {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: #fff;
}

.result-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
}

.result-change {
    font-size: 13px;
    margin-top: 5px;
    opacity: 0.9;
}

/* Target Section */
.target-section, .current-price-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.target-section h3, .current-price-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.target-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.target-row .form-group {
    margin-bottom: 0;
}

.target-result {
    display: flex;
    gap: 10px;
    font-weight: 600;
    color: #2c5aa0;
}

/* Profit Display */
.profit-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.profit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.profit-item span:first-child {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.profit-item span:last-child {
    font-size: 18px;
    font-weight: 700;
}

.profit-item .profit {
    color: #e53935;
}

.profit-item .loss {
    color: #1e88e5;
}

.loss {
    color: #1e88e5 !important;
}

.profit {
    color: #e53935 !important;
}

/* Guide Section */
.guide-section {
    margin-top: 40px;
}

.guide-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.guide-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.guide-card h3 {
    margin-bottom: 12px;
    color: #333;
}

.guide-card p {
    color: #666;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .purchase-row {
        grid-template-columns: 1fr;
    }
    
    .profit-display {
        grid-template-columns: 1fr;
    }
    
    .target-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-value {
        font-size: 20px;
    }
}




