:root {
    --primary-color: #2b87ff;
    --primary-light: #e6f0ff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --container-padding: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

.calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    background: transparent;
    box-sizing: border-box;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.input-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: var(--container-padding);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.toggle-container {
    display: flex;
    background: var(--primary-light);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.toggle-option {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toggle-option.active {
    background: var(--primary-color);
    color: var(--white);
}

.input-group {
    margin: 20px 0;
    transition: all 0.3s ease;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.time-inputs {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.time-inputs input {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

input, select {
    width: 100%;
    padding: 14px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--white);
    box-sizing: border-box;
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
}

button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #1a76ff;
    transform: translateY(-1px);
}

.result-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: var(--container-padding);
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.result-header {
    position: sticky;
    top: 0;
    background: var(--white);
    padding-bottom: 16px;
    z-index: 1;
}

.result-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-dark);
    text-align: center;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -24px;
    padding: 0 24px;
}

.pace-table {
    width: 100%;
    min-width: 500px;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
    font-size: 14px;
}

.pace-table th,
.pace-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #eee;
}

.pace-table th {
    background: var(--primary-light);
    color: var(--text-dark);
    font-weight: 600;
}

.pace-table th:first-child,
.pace-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.pace-table tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

.pace-table tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

.pace-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.pace-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.hidden {
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

@media screen and (max-width: 600px) {
    :root {
        --container-padding: 16px;
    }

    .calculator-container {
        padding: 0 12px;
        width: 100%;
    }

    .input-section {
        padding: var(--container-padding);
        margin: 0 auto 20px auto;
    }

    .time-inputs {
        flex-direction: column;
        gap: 8px;
        padding: 0;
    }

    h1 {
        font-size: 20px;
        text-align: center;
    }

    .result-section {
        padding: 16px;
        margin-top: 16px;
    }

    .table-container {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .pace-table {
        font-size: 12px;
    }

    .pace-table th,
    .pace-table td {
        padding: 8px;
    }

    .toggle-option {
        padding: 10px 8px;
        font-size: 14px;
    }
} 