* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #fafbfc;
    min-height: 100vh;
    padding: 30px 20px;
    color: #24292e;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e1e4e8;
}

.input-section {
    padding: 40px;
    background: #fafbfc;
    border-bottom: 1px solid #e1e4e8;
}

.input-section h2 {
    color: #24292e;
    margin-bottom: 24px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #24292e;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.calculate-btn {
    background: #2ea44f;
    color: white;
    border: none;
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
    margin-top: 14px;
}

.calculate-btn:hover {
    background: #2c974b;
}

.info-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 20px 0;
}

.info-box p {
    margin: 0;
    color: #856404;
    font-size: 0.88rem;
}

.info-box code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: #c7254e;
    font-weight: 500;
}

.result-section {
    padding: 40px;
    background: #ffffff;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-section h2 {
    color: #24292e;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.back-btn {
    background: #ffffff;
    color: #586069;
    border: 1px solid #d1d5da;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #f6f8fa;
    border-color: #0366d6;
    color: #0366d6;
}

.warehouse-times-section {
    background: #f6f8fa;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
}

.warehouse-time-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.warehouse-time-row label {
    min-width: 100px;
    font-size: 0.9rem;
    color: #24292e;
    font-weight: 500;
}

.warehouse-time-row input {
    flex: 1;
    max-width: 150px;
    padding: 8px 12px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 0.9rem;
}

.warehouse-time-row input:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

#routeTable {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #d1d5da;
}

th, td {
    padding: 12px 16px;
    text-align: center;
    border: 1px solid #e1e4e8;
    font-size: 0.9rem;
}

th {
    background: #f6f8fa;
    color: #24292e;
    font-weight: 600;
    border-bottom: 2px solid #d1d5da;
}

td {
    background: #fff;
    font-weight: 400;
}

tbody tr:nth-child(even) td {
    background: #fff;
}

tbody tr:nth-child(odd) td {
    background: #fff;
}

td:first-child {
    background: #f6f8fa !important;
    color: #24292e;
    font-weight: 600;
}

tr:hover td {
    background: #f6f8fa !important;
    transition: background 0.15s ease;
}

tr:hover td:first-child {
    background: #e1e4e8 !important;
}

.route-row {
    background: #fff;
    color: #24292e;
    font-weight: normal;
}

.route-row td {
    background: #fff;
    color: #24292e;
}

.route-row td:first-child {
    background: #f6f8fa !important;
    color: #24292e;
}

.time-cell {
    font-weight: 600;
    color: #0366d6;
}

.distance-cell {
    color: #586069;
    font-style: normal;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f6f8fa;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #586069;
    border: 1px solid #e1e4e8;
}

.counter-icon {
    font-size: 1.2rem;
}

#visitorCount {
    font-weight: 600;
    color: #0366d6;
    font-size: 1rem;
}

.counter-info {
    font-size: 0.8rem;
    color: #6a737d;
    margin-left: 10px;
}

@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    .input-section, .result-section {
        padding: 24px;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    .visitor-counter {
        flex-direction: column;
        gap: 5px;
        padding: 12px 16px;
    }
    
    .counter-info {
        margin-left: 0;
    }
}
