* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 400px 1fr;
    }
    
    .calculator-section {
        grid-column: 1 / 2;
    }
    
    .results-section,
    .schedule-section {
        grid-column: 2 / -1;
    }
}

.calculator-section,
.results-section,
.schedule-section {
    background: var(--surface);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group input[type="number"] {
    flex: 1;
}

.unit {
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

input[type="range"] {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    margin: 0;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: var(--primary-color);
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #60a5fa 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

thead {
    background: var(--primary-color);
    color: white;
}

th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: #f8fafc;
}

tbody tr:nth-child(even) {
    background: #f8fafc;
}

tbody tr:nth-child(even):hover {
    background: #e2e8f0;
}

td {
    padding: 12px;
    text-align: left;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: var(--text-secondary);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

/* 广告位样式 */
.ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container .adsbygoogle {
    display: block;
    width: 100%;
}

.ad-header {
    max-width: 728px;
    margin: 0 auto 20px;
    min-height: 90px;
}

.ad-sidebar {
    margin-top: 30px;
    max-width: 336px;
    margin-left: auto;
    margin-right: auto;
}

.ad-footer {
    max-width: 728px;
    margin: 30px auto 0;
    min-height: 250px;
}

@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
    }
    
    .ad-header,
    .ad-footer {
        max-width: 100%;
        min-height: 50px;
    }
    
    .ad-sidebar {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-section,
    .results-section,
    .schedule-section {
        padding: 20px;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
    }
}

.print-only {
    display: none;
}

@media print {
    body {
        background: white;
    }
    
    header,
    footer,
    .btn-primary,
    .btn-secondary,
    input[type="range"] {
        display: none;
    }
    
    .print-only {
        display: block;
        margin-bottom: 20px;
        text-align: center;
        font-size: 1.2rem;
        font-weight: bold;
    }
    
    .calculator-section,
    .results-section,
    .schedule-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
