/* Random Number Generator - Monte Carlo Simulation Styles */
/* 无彩色设计：简约、干净、清爽，白色为主色，无圆角设计 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000000;
    background-color: #ffffff;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: #ffffff;
    border: 3px solid #000000;
}

h1 {
    font-size: 2.8em;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1em;
    color: #666666;
    font-weight: 400;
    margin-bottom: 20px;
}

.usage-instructions {
    background: #f8f8f8;
    border: 2px solid #000000;
    padding: 20px;
    margin: 20px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.usage-instructions h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
    color: #000000;
}

.concept-intro {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

.concept-intro strong {
    color: #000000;
    font-weight: 600;
}

.usage-instructions ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.usage-instructions li {
    margin-bottom: 8px;
    font-size: 0.95em;
    color: #333;
}

/* Input Section */
.input-section {
    background: #ffffff;
    padding: 40px;
    margin-bottom: 30px;
    border: 3px solid #000000;
}

.input-section h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 400;
}

.description {
    margin-bottom: 30px;
    color: #333333;
    line-height: 1.7;
}

.input-group {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.input-field {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1em;
}

input[type="number"] {
    width: 100%;
    padding: 15px;
    border: 3px solid #000000;
    font-size: 16px;
    background: #ffffff;
    color: #000000;
    font-family: inherit;
}

input[type="number"]:focus {
    outline: none;
    border-color: #333333;
    background: #f8f8f8;
}

.start-button {
    background: #000000;
    color: #ffffff;
    padding: 18px 40px;
    border: 3px solid #000000;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.start-button:hover:not(:disabled) {
    background: #333333;
    border-color: #333333;
}

.start-button:disabled {
    background: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
    color: #666666;
}

/* Error Message */
.error-message {
    color: #000000;
    background: #f0f0f0;
    padding: 15px;
    margin-top: 20px;
    border: 3px solid #000000;
    font-weight: 500;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 50px;
    background: #ffffff;
    border: 3px solid #000000;
    margin-bottom: 30px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #000000;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-section p {
    font-size: 1.1em;
    color: #333333;
}

/* Results Section */
.results-section {
    background: #ffffff;
    padding: 40px;
    border: 3px solid #000000;
}

.results-section h2 {
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: 400;
    text-align: center;
}

/* Charts Container */
.charts-container {
    display: grid;
    gap: 20px;
    margin: 30px 0;
    width: 100%;
}

/* Large screens: 3 columns */
@media (min-width: 1024px) {
    .charts-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium screens: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-container .chart-wrapper:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
        max-width: 600px;
    }
}

/* Small screens: 1 column */
@media (max-width: 767px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

.chart-wrapper {
    border: 2px solid #000000;
    padding: 20px;
    background: #ffffff;
    position: relative;
    max-height: 500px;
    overflow: hidden;
}

.chart-wrapper h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 500;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Summary Section */
.summary-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f8f8;
    border: 3px solid #000000;
}

.summary-section h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.summary-content {
    font-family: 'Courier New', monospace;
    line-height: 2;
    font-size: 1.1em;
}

.summary-content p {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 20px;
    }
    
    .input-section {
        padding: 25px;
    }
    
    .results-section {
        padding: 25px;
    }
    
    h1 {
        font-size: 2.2em;
    }
    
    .input-section h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .input-section,
    .results-section {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .start-button {
        width: 100%;
        padding: 15px;
    }
}
