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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calculator-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

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

h1 {
    color: #5a67d8;
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}

.subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 14px;
}

.growth-type-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="number"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 30px;
}

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

.calculate-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.back-btn {
    flex: 1;
    padding: 15px;
    background: #e2e8f0;
    color: #4a5568;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #cbd5e0;
    border-color: #a0aec0;
    transform: translateY(-1px);
}

.results {
    margin-top: 30px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.results h2 {
    color: #5a67d8;
    margin-bottom: 20px;
    font-size: 22px;
}

.result-item {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
}

.result-value {
    font-size: 18px;
    color: #2d3748;
}

.warning {
    background: #fff5f5;
    border-left-color: #fc8181;
    margin-top: 15px;
}

.info {
    background: #ebf8ff;
    border-left-color: #4299e1;
    margin-top: 15px;
}

.disclaimer {
    margin-top: 30px;
    padding: 15px;
    background: #fef5e7;
    border-radius: 8px;
    font-size: 12px;
    color: #744210;
    text-align: center;
}

.version-details {
    margin-top: 12px;
    text-align: left;
}

.version-details summary {
    cursor: pointer;
    font-weight: 600;
    font-style: italic;
    color: #8b5a2b;
    padding: 8px 12px;
    background: rgba(139, 90, 43, 0.1);
    border-radius: 6px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.version-details summary::-webkit-details-marker {
    display: none;
}

.version-details summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.2s ease;
}

.version-details[open] summary::before {
    transform: rotate(90deg);
}

.version-details summary:hover {
    background: rgba(139, 90, 43, 0.18);
}

.version-content {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-style: italic;
    line-height: 1.6;
    text-align: justify;
    animation: fadeIn 0.3s ease-out;
}

.growth-visual {
    margin: 20px 0;
    text-align: center;
}

.size-bar {
    height: 30px;
    background: #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin: 10px 0;
}

.current-size {
    height: 100%;
    background: #667eea;
    transition: width 1s ease-out;
    position: relative;
}

.projected-size {
    height: 100%;
    background: #9f7aea;
    position: absolute;
    top: 0;
    transition: width 1s ease-out;
}

.size-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
}

.growth-type-card {
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.growth-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.growth-type-card:hover::before {
    left: 100%;
}

.growth-type-card:hover {
    border-color: #667eea;
    transform: translateX(5px) translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.growth-type-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #ebf4ff 0%, #f0f8ff 100%);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.growth-type-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.growth-type-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.growth-type-description {
    font-size: 14px;
    color: #718096;
}

.hidden {
    display: none;
}

.input-section {
    animation: fadeIn 0.5s ease-out;
}

/* Additional styles for our enhanced features */
.input-group {
    margin-bottom: 15px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: background-color 0.2s;
}

.checkbox-option:hover {
    background: #e9ecef;
}

input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.resolution-probability {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.resolution-probability span {
    font-weight: 600;
    color: #2e7d32;
    font-size: 24px;
}

.clinical-recommendations {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.clinical-recommendations h4 {
    color: #856404;
    margin-bottom: 10px;
}

.clinical-recommendations ul {
    list-style-type: none;
    padding-left: 20px;
}

.clinical-recommendations li {
    margin-bottom: 8px;
    position: relative;
}

.clinical-recommendations li:before {
    content: "•";
    position: absolute;
    left: -15px;
    color: #856404;
    font-weight: bold;
}

.risk-factors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin: 15px 0;
}

.risk-factors p {
    margin: 0 0 5px 0;
}

.risk-factors ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

/* Enhanced Li model section styling */
.li-model-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border-left: none;
    transition: all 0.3s ease;
}

.li-model-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.li-model-section p {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

#liModelFields {
    animation: fadeIn 0.3s ease-out;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e8ed;
}

/* Multi-time projections table styling */
.multi-time-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.multi-time-table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: #4a5568;
}

.multi-time-table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
    color: #2d3748;
}

.multi-time-table tr:hover {
    background-color: #f7fafc;
}

/* Clinical Summary styling */
.clinical-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.summary-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.summary-content {
    font-size: 15px;
    line-height: 1.6;
    color: white;
}

.summary-content br {
    margin-bottom: 8px;
}

.summary-content strong {
    color: #ffd700;
    font-weight: 600;
}

/* Export/Print Buttons */
.export-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
}

.export-btn.print-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.export-btn.print-btn:hover {
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

/* Primary Results Styling */
.primary-result {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-left: 6px solid #6366f1;
    padding: 20px;
    margin-bottom: 20px;
}

.primary-result .result-label {
    color: #4338ca;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-result .result-value {
    color: #1e1b4b;
    font-size: 24px;
    font-weight: 700;
    margin-top: 8px;
}

/* Confidence Interval Styling */
#confidenceIntervalDisplay {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
    padding: 18px;
}

#confidenceIntervalDisplay .result-label {
    color: #92400e;
    font-size: 15px;
    font-weight: 600;
}

#confidenceIntervalDisplay .result-value {
    color: #78350f;
    font-weight: 600;
    font-size: 18px;
}

.result-explanation {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #d97706;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}

/* Additional Details Collapsible */
.additional-details {
    margin-top: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.additional-details summary {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.additional-details summary::-webkit-details-marker {
    display: none;
}

.additional-details summary::before {
    content: '▶';
    font-size: 10px;
    transition: transform 0.2s ease;
}

.additional-details[open] summary::before {
    transform: rotate(90deg);
}

.additional-details summary:hover {
    color: #475569;
    background: #f1f5f9;
    border-radius: 8px 8px 0 0;
}

.details-content {
    padding: 0 20px 20px 20px;
}

.details-content .result-item {
    margin-bottom: 10px;
}

/* ROMA/RMI Score Styling */
#romaScoreDisplay, #rmiScoreDisplay {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-left-color: #ec4899;
}

#romaScoreDisplay .result-label,
#rmiScoreDisplay .result-label {
    color: #9d174d;
}

#romaScoreDisplay .result-value,
#rmiScoreDisplay .result-value {
    color: #831843;
    font-weight: 600;
}

/* FIGO Classification Styling */
#figoClassDisplay {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-left-color: #6366f1;
}

#figoClassDisplay .result-label {
    color: #3730a3;
}

#figoClassDisplay .result-value {
    color: #312e81;
    font-weight: 600;
}

/* References Section Styling */
#referencesDisplay {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #22c55e;
    font-size: 13px;
}

#referencesDisplay .result-label {
    color: #166534;
    font-size: 14px;
}

#referencesDisplay .result-value {
    color: #15803d;
    line-height: 1.6;
}

/* Enhanced Input Sections */
.tumor-markers-section,
.iota-section,
.figo-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.tumor-markers-section h4,
.iota-section h4,
.figo-section h4 {
    color: #475569;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tumor-markers-section h4::before {
    content: none;
}

.iota-section h4::before {
    content: none;
}

.figo-section h4::before {
    content: none;
}

/* Risk Badge Styling */
.risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-badge.low {
    background: #dcfce7;
    color: #166534;
}

.risk-badge.intermediate {
    background: #fef3c7;
    color: #92400e;
}

.risk-badge.high {
    background: #fee2e2;
    color: #991b1b;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .calculator-container {
        box-shadow: none;
        max-width: 100%;
        padding: 20px;
    }
    
    .growth-type-selector,
    #calculatorForm,
    .export-buttons,
    .back-btn,
    .calculate-btn {
        display: none !important;
    }
    
    .results {
        display: block !important;
        background: white;
        border: 1px solid #ddd;
    }
    
    .result-item {
        break-inside: avoid;
    }
    
    .disclaimer {
        font-size: 10px;
        margin-top: 20px;
    }
} 