body {
    font-family: cursive;
    background-color: #f5e6d3;
    color: #2c1810;
    line-height: 1.6;
}

.diary-container {
    max-width: 800px;
    margin: 2rem auto;
    background: linear-gradient(to right, #fff9f0, #fff5e6);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
}

.diary-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 1rem;
}

.diary-title {
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.diary-date {
    font-size: 1.2rem;
    color: #666;
}

.diary-page {
    background: linear-gradient(to bottom, transparent 0%, transparent calc(1.6rem - 1px), #b5c7d3 calc(1.6rem), transparent calc(1.6rem + 1px));
    background-size: 100% 1.6rem;
    line-height: 1.6rem;
    padding: 0 1rem;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.diary-entry {
    font-size: 1.3rem;
    margin: 0;
    padding: 0.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-input {
    width: 100%;
    background: transparent;
    border: none;
    font-family: cursive;
    font-size: 1.3rem;
    line-height: 1.6rem;
    padding: 0;
    margin: 0;
    outline: none;
    color: #2c1810;
    resize: vertical;
    min-height: 60px;
}

.diary-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #8b4513;
}

.btn-group {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-diary {
    background-color: #8b4513;
    color: #fff;
    border: none;
    padding: 0.5rem 2rem;
    font-size: 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-diary:hover {
    background-color: #6b3410;
    transform: translateY(-2px);
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
}

.page-btn {
    background-color: #8b4513;
    color: #fff;
    border: none;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: #6b3410;
}

.page-btn.active {
    background-color: #2c1810;
}

.page-info {
    margin: 0 1rem;
    font-size: 1.1rem;
    color: #666;
}

.entry-serial {
    font-weight: bold;
    margin-right: 0.5rem;
    color: #8b4513;
}

.entry-text {
    flex-grow: 1;
    margin-right: 1rem;
}

.entry-timestamp {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

.pin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.pin-content {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.pin-content h2 {
    color: #8b4513;
    margin-bottom: 1rem;
}

#pinInput {
    padding: 0.5rem;
    font-size: 1.2rem;
    border: 2px solid #8b4513;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

#pinSubmit {
    background-color: #8b4513;
    color: #fff;
    border: none;
    padding: 0.5rem 2rem;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
}

