/* 预加载背景图片 */
body::after {
    content: '';
    position: fixed;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    background-image: url('https://i.imgur.com/9E8zYQx.jpg');
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0; /* 备用背景色 */
    min-height: 100vh;
}

body.loaded {
    background: 
        linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
        url('https://i.imgur.com/9E8zYQx.jpg') center/cover no-repeat fixed;
    transition: background 0.5s ease;
}

.main-content {
    background-color: rgba(255,255,255,0.8);
    backdrop-filter: blur(2px);
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background-color: #2c3e50;
    padding: 20px 0;
}

.menu-item {
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #34495e;
}

.menu-item.active {
    background-color: #3498db;
}

.main-content {
    flex: 1;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.converter {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

#timestamp-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#timestamp-input-group input {
    flex: 1;
    margin-left: 0;
}

select, input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

select {
    min-width: 120px;
}

input {
    flex: 1;
    margin-left: 10px;
}

input[type="datetime-local"] {
    flex: 1;
    margin-left: 0;
}

#heartCanvas {
    display: block;
    margin: 0 auto;
    background-color: transparent;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
}

button:hover {
    background-color: #45a049;
}

.results {
    margin-top: 20px;
}

.results div {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.results span:first-child {
    font-weight: bold;
    margin-right: 10px;
}