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

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

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 40px;
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-section textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    resize: vertical;
    transition: border-color 0.3s;
}

.input-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.text-stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    font-size: 0.95em;
    color: #666;
}

.text-stats strong {
    color: #333;
    font-size: 1.1em;
}

.settings-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
}

.speed-selector {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.speed-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1.05em;
}

.speed-selector input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.speed-input {
    display: grid;
    gap: 15px;
}

.speed-input label {
    font-weight: 500;
    color: #555;
}

.speed-input input[type="number"] {
    width: 150px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1em;
    text-align: center;
}

.speed-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.speed-presets button {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.speed-presets button:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.speed-presets button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.result-section {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    padding: 30px;
    border-radius: 15px;
}

.time-display {
    text-align: center;
    margin-bottom: 30px;
}

.time-main {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.time-breakdown {
    color: #666;
    font-size: 1.1em;
}

.page-estimate {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.page-estimate h3 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.page-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.page-type {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.page-count {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.page-unit {
    display: block;
    color: #999;
    font-size: 0.85em;
}

.comparison {
    background: white;
    padding: 25px;
    border-radius: 10px;
}

.comparison h3 {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.schedule-grid {
    display: grid;
    gap: 15px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.schedule-icon {
    font-size: 1.5em;
}

.schedule-text {
    flex: 1;
    color: #666;
}

.schedule-days {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.url-section {
    background: #f0f4ff;
    padding: 30px;
    border-radius: 15px;
}

.url-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.url-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.url-input button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.3s;
}

.url-input button:hover {
    background: #5a67d8;
}

.url-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.url-note {
    color: #666;
    font-size: 0.9em;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    main {
        padding: 20px;
    }
    
    .time-main {
        font-size: 2.5em;
    }
    
    .page-grid {
        grid-template-columns: 1fr;
    }
    
    .url-input {
        flex-direction: column;
    }
    
    .speed-selector {
        flex-direction: column;
        gap: 15px;
    }
}