html, body {
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#container {
    padding: 0;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

.row {
    margin: 0;
    padding: 0;
}

.banner-section {
    background: linear-gradient(135deg, #ff4611 0%, #FE4C40 50%, #ff6b35 100%);
    height: 120px;
    position: relative;
    overflow: hidden;
}

.banner-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.profile-card {
    display: flex;
    justify-content: center;
    position: relative;
    margin-top: -60px;
    padding: 0 20px;
    z-index: 10;
}

.profile-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    padding: 0;
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.leftbox {
    width: 280px;
    padding: 30px 25px;
    border-right: 1px solid #f0f0f0;
    background: white;
    border-radius: 16px 0 0 16px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    height: fit-content;
}

.leftInfo:first-child {
    text-align: center;
    margin-bottom: 25px;
}

.leftInfo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.leftInfo img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 70, 17, 0.25);
}

.admin_info {
    background: white;
    padding: 0;
}

.admin_info .h4 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.admin_info .h5 {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

.admin_info div {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    padding: 10px 15px;
    background: rgba(255, 70, 17, 0.04);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin_info div i {
    color: #ff4611;
}

.admin_info .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.admin_info a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ff4611;
    font-size: 14px;
    padding: 10px 15px;
    border: 1px solid #ff4611;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.admin_info a:hover {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white;
    text-decoration: none;
}

.admin_info #leaveword {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white !important;
    border: none;
}

.admin_info #leaveword:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(255, 70, 17, 0.3);
}

.admin_info a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.leftInfo:not(:first-child) {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.eyerow {
    background: rgba(255, 70, 17, 0.08);
    color: #ff4611;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

#countTime {
    font-size: 13px;
    color: #666;
    text-align: center;
}

.cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cloud span {
    background: rgba(255, 70, 17, 0.06);
    color: #ff4611;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.cloud span:hover {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white;
    transform: translateY(-2px);
}

.cloud a {
    color: inherit;
    text-decoration: none;
}

.rightbox {
    flex: 1;
    padding: 30px;
    background: white;
    border-radius: 0 16px 16px 0;
}

.article_tip {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.article_tip .text-danger {
    color: #ff4611;
}

.visit-scope {
    color: #667eea;
    font-weight: 500;
    font-size: 14px;
}

.article_tip small {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    margin-left: auto;
}

.diary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diary-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.diary-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #ff4611;
}

.diary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.diary-emotion {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.diary-tag {
    font-size: 12px;
    color: #ff4611;
    background: rgba(255, 70, 17, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    flex-shrink: 0;
}

.diary-date {
    font-size: 12px;
    color: #999;
    margin-left: auto;
    flex-shrink: 0;
}

.diary-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.5;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.diary_content {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    padding-top: 4px;
}

.visit-pagination {
    padding: 30px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.visit-pagination .btn {
    margin: 0 8px;
    padding: 10px 28px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.visit-pagination {
    padding: 30px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.visit-pagination .btn {
    margin: 0;
    padding: 10px 28px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.visit-pagination .btn-success {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    border: none;
    color: white !important;
}

.visit-pagination .btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 70, 17, 0.4);
}

.visit-pagination .btn-danger {
    background: white;
    border: 2px solid rgba(255, 70, 17, 0.3);
    color: #ff4611;
}

.visit-pagination .btn-danger:hover {
    border-color: #ff4611;
    background: rgba(255, 70, 17, 0.05);
}

.question {
    cursor: pointer;
    color: #ff4611;
    font-size: 14px;
}

.question:hover {
    opacity: 0.8;
}

.LeaveWord {
    position: fixed;
    display: none;
    width: 100vw;
    height: 100vh;
    padding: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 6000;
    overflow: hidden;
}

.leave-modal {
    width: 100%;
    max-width: 600px;
    height: 80vh;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    margin: 10vh auto 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.leave-header-bar {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    font-size: 16px;
    font-weight: 600;
}

.closeleavebox {
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.closeleavebox:hover {
    background: rgba(255, 255, 255, 0.3);
}

.LeaveWord .leavecontentwrap {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f8f9fa;
}

.leave-item {
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.15s ease;
}

.leave-item:last-child {
    border-bottom: none;
}

.leave-item:hover {
    background-color: #f1f3f4;
}

.leave-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.leave-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.leave-info {
    flex: 1;
    min-width: 0;
}

.leave-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.leave-num {
    font-size: 10px;
    color: #999;
    font-weight: 400;
    flex-shrink: 0;
}

.leave-nickname {
    font-size: 12px;
    color: #5f6368;
    font-weight: 500;
    flex-shrink: 0;
}

.leave-delete {
    margin-left: auto;
    padding: 1px 4px;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.leave-delete:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.08);
}

.leave-content {
    font-size: 13px;
    color: #202124;
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 2px;
}

.leave-date {
    font-size: 10px;
    color: #9aa0a6;
}

.LeaveWord .row {
    margin: 0;
}

.leave-input-area {
    background: white;
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.leave-input-area textarea {
    flex: 1;
    min-height: 36px;
    max-height: 120px;
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    background: #f1f3f4;
}

.leave-input-area textarea:focus {
    border-color: #ff4611;
    background: white;
}

.leave-input-area textarea::placeholder {
    color: #9aa0a6;
}

.leave-send-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.leave-send-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(255, 70, 17, 0.3);
}

.leave-send-btn:active {
    transform: scale(0.98);
}

.leave-reset-btn {
    padding: 8px 16px;
    background: #f1f3f4;
    color: #5f6368;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.leave-reset-btn:hover {
    background: #e8eaed;
}

.diary-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 7000;
    display: none;
    align-items: center;
    justify-content: center;
}

.diary-modal-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.diary-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.diary-modal-header {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.diary-modal-title {
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.diary-modal-close {
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.diary-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.diary-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.diary-modal-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.diary-modal-emotion {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.diary-modal-tag {
    font-size: 12px;
    color: #ff4611;
    background: rgba(255, 70, 17, 0.08);
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.diary-modal-date {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.diary-modal-content-text {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    word-break: break-all;
}

.diary-modal-content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.diary-modal-content-text p {
    margin-bottom: 12px;
}

.diary-modal-content-text a {
    color: #ff4611;
    text-decoration: none;
}

.diary-modal-content-text a:hover {
    text-decoration: underline;
}

.diary-modal-content-text h1,
.diary-modal-content-text h2,
.diary-modal-content-text h3,
.diary-modal-content-text h4,
.diary-modal-content-text h5,
.diary-modal-content-text h6 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.diary-modal-content-text ul,
.diary-modal-content-text ol {
    margin: 12px 0;
    padding-left: 24px;
}

.diary-modal-content-text li {
    margin-bottom: 4px;
}

.diary-modal-content-text blockquote {
    border-left: 4px solid #ff4611;
    padding-left: 16px;
    margin: 16px 0;
    color: #666;
    background: #f9f9f9;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

.diary-modal-content-text code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: #c7254e;
}

.diary-modal-content-text pre {
    background: #2d2d2d;
    color: #ccc;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.diary-modal-content-text pre code {
    background: none;
    padding: 0;
    color: #ccc;
    font-size: 13px;
}

.diary-modal-content-text hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 24px 0;
}

.diary-modal-content-text strong {
    font-weight: 600;
    color: #333;
}

.diary-modal-content-text em {
    font-style: italic;
}

.diary-modal-content-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.diary-modal-content-text th,
.diary-modal-content-text td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.diary-modal-content-text th {
    background: #f5f5f5;
    font-weight: 600;
}

.diary-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.diary-modal-like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diary-modal-like-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 70, 17, 0.3);
}

.diary-modal-like-btn.liked {
    background: #fff;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.diary-modal-like-btn.liked .glyphicon-heart {
    animation: like-bounce 0.6s ease;
}

@keyframes like-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.leavecontent {
    word-wrap: break-word;
    word-break: break-word;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

.LeaveWord .btn-danger {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 8px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.LeaveWord .btn-danger:hover {
    background: #e8e8e8;
}

.LeaveWord .btn-success {
    background: linear-gradient(135deg, #ff4611, #FE4C40);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 8px 28px;
    transition: all 0.3s ease;
}

.LeaveWord .btn-success:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 70, 17, 0.35);
}

@media screen and (max-width: 768px) {
    .profile-wrapper {
        flex-direction: column;
        border-radius: 16px;
    }

    .leftbox {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 16px 16px 0 0;
        position: static;
    }

    .leftInfo img {
        width: 100px;
        height: 100px;
    }

    .rightbox {
        border-radius: 0 0 16px 16px;
        padding: 20px;
    }

    .article dl {
        flex-direction: column;
    }

    .article dl dt {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    .article dl dt img {
        margin-bottom: 0;
    }

    .article_tip {
        font-size: 17px;
    }

    .banner-section {
        height: 100px;
    }

    .profile-card {
        margin-top: -50px;
    }
}

@media screen and (min-width: 500px) {
    .LeaveWord {
        padding: 40px 15vw;
    }
}

@media screen and (max-width: 500px) {
    .leftInfo:not(:first-child) {
        display: none;
    }

    .admin_info .btn-group {
        flex-direction: column;
    }

    .banner-section {
        height: 80px;
    }

    .profile-card {
        margin-top: -40px;
    }

    .article {
        padding: 15px 0;
    }
}

iframe {
    width: 95% !important;
    margin: 0 auto;
    display: block;
    max-height: 400px !important;
}