* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    padding: 0;
    line-height: 1.6;
    color: #374151;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

/* Header */
header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 2px solid #e5e7eb;
    padding: 25px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    max-width: 220px;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
    flex: 1;
    text-align: center;
    letter-spacing: -0.5px;
}

/* Calculator */
.calculator {
    padding: 40px;
}

/* Section Cards */
.section {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.section h3 {
    color: #1e40af;
    margin-bottom: 25px;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h4 {
    color: #374151;
    margin: 20px 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #9ca3af;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Static Value Box */
/* Processing Cost Section */
.processing-cost-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    position: relative;
}

.processing-cost-section h4 {
    color: #0369a1;
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.processing-cost-section h4 i {
    color: #3b82f6;
}

.processing-total {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.processing-total strong {
    font-weight: 600;
}

.processing-total span {
    font-weight: 700;
    font-size: 1.2rem;
    margin-left: 10px;
}

.static-value {
    padding: 14px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 52px;
}

/* Ply Specifications */
.ply-specs {
    display: none;
    background: #f9fafb;
    padding: 25px;
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid #e5e7eb;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 18px 40px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

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

/* Results Section */
.results {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.result-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
}

.result-card h4 {
    color: #1e40af;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Highlight Card (Final Pricing) */
.result-card.highlight {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(30, 64, 175, 0.4);
}

.result-card.highlight h4 {
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.result-card table {
    width: 100%;
    border-collapse: collapse;
}

.result-card td {
    padding: 12px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #f3f4f6;
}

.result-card tr:last-child td {
    border-bottom: none;
}

.result-card td:first-child {
    color: #6b7280;
    font-weight: 500;
}

.result-card td:last-child {
    text-align: right;
    font-weight: 700;
    color: #1f2937;
}

.result-card.highlight td:first-child {
    color: rgba(255,255,255,0.85);
}

.result-card.highlight td:last-child {
    color: white;
}

.result-card tr.final td {
    font-size: 1.15rem;
    padding-top: 15px;
    border-top: 2px solid rgba(255,255,255,0.4);
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.print-btn, .save-btn {
    flex: 1;
    padding: 16px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.print-btn {
    background: #6b7280;
    color: white;
}

.save-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.print-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.save-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(5, 150, 105, 0.4);
}

/* Footer */
footer {
    background: #1f2937;
    padding: 25px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

footer .home-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #046bd2 0%, #0353a4 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer .home-btn:hover {
    background: linear-gradient(135deg, #0353a4 0%, #024a94 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 107, 210, 0.3);
}

/* Logo Link */
.logo-container a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-container a:hover {
    transform: scale(1.02);
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    .container {
        box-shadow: none;
    }
    .calculate-btn, .actions {
        display: none;
    }
    .section {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .logo {
        max-width: 180px;
    }

    header h2 {
        font-size: 1.3rem;
    }

    .calculator {
        padding: 20px;
    }

    .section {
        padding: 20px;
    }

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

    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results {
    animation: fadeIn 0.5s ease;
}
