/* Smart Profit Calculator - Main Styles */

.spc-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    max-width: 650px;
    width: 100%;
    margin: 30px auto;
    padding: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.spc-header {
    text-align: center;
    margin-bottom: 30px;
}

.spc-header h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 700;
}

.spc-header p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

.spc-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 5px solid #667eea;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    font-size: 13px;
    color: #424242;
    line-height: 1.6;
}

.spc-form {
    margin-bottom: 30px;
}

.spc-form-group {
    margin-bottom: 20px;
}

.spc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.spc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.spc-form-group input,
.spc-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: #fff;
    color: #2c3e50;
}

.spc-form-group input:focus,
.spc-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.spc-form-group input::placeholder {
    color: #bdc3c7;
}

.spc-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.spc-required {
    color: #e74c3c;
    font-weight: bold;
}

.spc-button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.spc-btn {
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.spc-btn-calculate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.spc-btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.spc-btn-calculate:active {
    transform: translateY(0);
}

.spc-btn-reset {
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.spc-btn-reset:hover {
    background: #bdc3c7;
    color: white;
}

.spc-result-section {
    margin-top: 40px;
    display: none;
    animation: spc-slideIn 0.4s ease;
}

.spc-result-section.show {
    display: block;
}

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

.spc-result-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    margin: -40px -40px 0 -40px;
    padding-left: 40px;
    padding-right: 40px;
}

.spc-result-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.spc-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: white;
}

.spc-result-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.spc-result-table tbody tr:hover {
    background-color: #f8f9fa;
}

.spc-result-table tbody tr.spc-final-row {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f4f8 100%);
    border-bottom: 2px solid #667eea;
}

.spc-result-table tbody tr.spc-final-row:hover {
    background: linear-gradient(135deg, #eef2f7 0%, #e8f0f6 100%);
}

.spc-result-table td {
    padding: 16px;
    font-size: 15px;
}

.spc-label {
    color: #7f8c8d;
    font-weight: 500;
    text-align: left;
    width: 60%;
}

.spc-result-table tbody tr.spc-final-row .spc-label {
    color: #2c3e50;
    font-weight: 700;
}

.spc-value {
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
    font-size: 16px;
}

.spc-final-value {
    font-size: 20px;
    font-weight: 700;
}

.spc-profit {
    color: #27ae60 !important;
}

.spc-loss {
    color: #e74c3c !important;
}

.spc-break-even {
    color: #f39c12 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spc-container {
        padding: 25px;
        margin: 20px 10px;
    }

    .spc-header h1 {
        font-size: 22px;
    }

    .spc-form-row {
        grid-template-columns: 1fr;
    }

    .spc-button-group {
        grid-template-columns: 1fr;
    }

    .spc-result-header {
        margin: -25px -25px 0 -25px;
        padding-left: 25px;
        padding-right: 25px;
    }

    .spc-result-table td {
        padding: 12px;
        font-size: 14px;
    }

    .spc-result-header h2 {
        font-size: 20px;
    }

    .spc-value {
        font-size: 14px;
    }

    .spc-final-value {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .spc-container {
        padding: 20px;
        margin: 15px 10px;
    }

    .spc-header h1 {
        font-size: 20px;
    }

    .spc-header p {
        font-size: 12px;
    }

    .spc-form-group input,
    .spc-form-group select {
        padding: 10px;
        font-size: 16px;
    }

    .spc-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .spc-result-table td {
        padding: 10px;
        font-size: 13px;
    }

    .spc-result-header {
        margin: -20px -20px 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
        padding: 15px 20px;
    }

    .spc-result-header h2 {
        font-size: 18px;
    }

    .spc-label {
        width: 55%;
    }

    .spc-value {
        font-size: 13px;
    }

    .spc-final-value {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .spc-button-group,
    .spc-form {
        display: none;
    }

    .spc-container {
        box-shadow: none;
        border: 1px solid #ddd;
        margin: 0;
        padding: 20px;
    }

    .spc-result-section {
        display: block !important;
    }
}
