@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Ma+Shan+Zheng&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    min-height: 100vh;
}

body.home-page {
    min-height: 100vh;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        #0a0a1a 0%,
        #1a1a2e 30%,
        #2d2d44 50%,
        #4a3f35 70%,
        #6b5b4f 100%);
    z-index: -2;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, white, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 370px 50px, white, transparent),
        radial-gradient(2px 2px at 450px 180px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 520px 100px, white, transparent),
        radial-gradient(2px 2px at 600px 140px, rgba(255,255,255,0.9), transparent);
    background-size: 650px 200px;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.milky-way {
    position: absolute;
    top: 10%;
    left: 20%;
    width: 60%;
    height: 40%;
    background: radial-gradient(ellipse at center,
        rgba(255, 220, 180, 0.15) 0%,
        rgba(200, 180, 255, 0.1) 30%,
        transparent 70%);
    filter: blur(40px);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

.north-star {
    position: absolute;
    top: 12%;
    right: 18%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #fffacd 0%, #ffd700 50%, transparent 70%);
    border-radius: 50%;
    box-shadow:
        0 0 10px 3px rgba(255, 215, 0, 0.8),
        0 0 20px 6px rgba(255, 215, 0, 0.5),
        0 0 30px 10px rgba(255, 215, 0, 0.3);
    animation: starGlow 3s ease-in-out infinite;
}

@keyframes starGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.crescent-moon {
    position: absolute;
    top: 8%;
    left: 12%;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: transparent;
    box-shadow:
        inset -15px 0 0 0 #fffacd,
        inset -5px 0 15px 5px rgba(139, 90, 43, 0.3);
    animation: moonShine 8s ease-in-out infinite;
}

.crescent-moon::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 250, 205, 0.4) 30%,
        transparent 60%);
}

@keyframes moonShine {
    0%, 100% { box-shadow: inset -15px 0 0 0 #fffacd, inset -5px 0 15px 5px rgba(139, 90, 43, 0.3); }
    50% { box-shadow: inset -15px 0 0 0 #fffacd, inset -5px 0 20px 8px rgba(139, 90, 43, 0.4); }
}

.wooden-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(139, 90, 43, 0.03) 50px,
            rgba(139, 90, 43, 0.03) 51px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(139, 90, 43, 0.03) 50px,
            rgba(139, 90, 43, 0.03) 51px
        );
    z-index: -1;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.clock {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border: 3px solid #8B5A2B;
    box-shadow:
        0 0 15px rgba(139, 90, 43, 0.5),
        inset 0 0 8px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.clock-face {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    position: relative;
}

.clock-hour, .clock-minute, .clock-second {
    position: absolute;
    background: #8B5A2B;
    transform-origin: bottom center;
}

.clock-hour {
    width: 2.5px;
    height: 15px;
    top: 16px;
    left: 50%;
    margin-left: -1.25px;
    border-radius: 2px;
}

.clock-minute {
    width: 1.5px;
    height: 22px;
    top: 9px;
    left: 50%;
    margin-left: -0.75px;
    border-radius: 1px;
}

.clock-second {
    width: 1px;
    height: 25px;
    top: 6px;
    left: 50%;
    margin-left: -0.5px;
    background: #c94b4b;
}

.clock-center {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #8B5A2B;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(139, 90, 43, 0.8);
}

.site-title h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: #d4a574;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(212, 165, 116, 0.3);
    letter-spacing: 6px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    flex: 1;
}

.welcome-card {
    background: linear-gradient(145deg,
        rgba(139, 90, 43, 0.4),
        rgba(101, 67, 33, 0.5));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 18px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quote {
    text-align: center;
    color: #f5e6d3;
}

.quote .fa-quote-left, .quote .fa-quote-right {
    font-size: 1.5rem;
    color: #d4a574;
    opacity: 0.7;
}

.quote p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 8px 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg,
        rgba(212, 165, 116, 0.3),
        rgba(139, 90, 43, 0.4));
    display: flex;
    justify-content: center;
    align-items: center;
    color: #f5e6d3;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 165, 116, 0.3);
    position: relative;
    cursor: pointer;
}

.social-icon::after {
    content: attr(title);
    position: absolute;
    bottom: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #f5e6d3;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.social-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.social-icon:hover {
    transform: translateY(-5px);
    background: linear-gradient(145deg,
        rgba(212, 165, 116, 0.5),
        rgba(139, 90, 43, 0.6));
    box-shadow: 0 5px 20px rgba(212, 165, 116, 0.3);
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-cards::-webkit-scrollbar {
    width: 6px;
}

.info-cards::-webkit-scrollbar-track {
    background: rgba(139, 90, 43, 0.2);
    border-radius: 3px;
}

.info-cards::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.5);
    border-radius: 3px;
}

.card {
    background: linear-gradient(145deg,
        rgba(139, 90, 43, 0.4),
        rgba(101, 67, 33, 0.5));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.life-quote {
    font-size: 1rem;
    color: #f5e6d3;
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.85rem;
    color: #d4a574;
    opacity: 0.8;
}

.time-card {
    text-align: center;
    margin-top: 10px;
}

.date-display {
    font-size: 0.85rem;
    color: #d4a574;
    margin-bottom: 8px;
    opacity: 0.9;
}

.time-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f5e6d3;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 15px rgba(212, 165, 116, 0.5);
    margin-bottom: 8px;
}

.weather-display {
    font-size: 0.8rem;
    color: #d4a574;
    opacity: 0.8;
}

.card-links {
    margin-top: auto;
    margin-bottom: 8px;
}

.card-links h3 {
    font-size: 1rem;
    color: #d4a574;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.link-card {
    background: linear-gradient(145deg,
        rgba(212, 165, 116, 0.2),
        rgba(139, 90, 43, 0.3));
    border-radius: 10px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #f5e6d3;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.link-card:hover {
    transform: translateY(-3px);
    background: linear-gradient(145deg,
        rgba(212, 165, 116, 0.3),
        rgba(139, 90, 43, 0.4));
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.link-card i {
    font-size: 1.4rem;
    color: #d4a574;
}

.link-card .link-title {
    font-size: 0.85rem;
}

.link-card .link-desc {
    font-size: 0.65rem;
    color: #8a8a8a;
}

.footer {
    text-align: center;
    margin-top: 10px;
    color: #d4a574;
    opacity: 0.6;
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.footer a {
    color: #d4a574;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .container {
        padding: 20px 15px;
    }

    .site-title h1 {
        font-size: 2.5rem;
    }

    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-title h1 {
        font-size: 2.2rem;
    }

    .clock {
        width: 65px;
        height: 65px;
    }

    .clock-face {
        width: 50px;
        height: 50px;
    }

    .clock-hour {
        height: 12px;
        top: 13px;
    }

    .clock-minute {
        height: 18px;
        top: 7px;
    }

    .clock-second {
        height: 21px;
        top: 5px;
    }
}

@media (max-width: 768px) {
    .site-title h1 {
        font-size: 1.8rem;
        letter-spacing: 6px;
    }

    .clock {
        width: 55px;
        height: 55px;
    }

    .clock-face {
        width: 42px;
        height: 42px;
    }

    .clock-hour {
        height: 10px;
        top: 11px;
    }

    .clock-minute {
        height: 15px;
        top: 6px;
    }

    .clock-second {
        height: 17px;
        top: 4px;
    }

    .time-display {
        font-size: 2rem;
    }
}

.quote-qrcode-row {
    display: flex;
    gap: 15px;
}

.quote-qrcode-row .quote-card {
    flex: 1;
}

.qrcode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    min-width: 180px;
    width: 180px;
}

.qrcode-img {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(212, 165, 116, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.additional-text {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #c9a87c;
    line-height: 1.8;
    text-align: left;
    opacity: 0.9;
}

.additional-text p {
    margin: 3px 0;
    padding: 0;
}

.quote-qrcode-row .quote-card {
    flex: 1;
    padding-bottom: 15px;
}

.qrcode-text {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #d4a574;
    text-shadow:
        0 0 10px rgba(212, 165, 116, 0.8),
        0 0 20px rgba(212, 165, 116, 0.5),
        0 0 30px rgba(212, 165, 116, 0.3);
    letter-spacing: 2px;
}
.qrcode-sub {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #c9b896;
    letter-spacing: 3px;
}
}

@media (max-width: 600px) {
    .links-grid {
        grid-template-columns: 1fr;
    }

    .site-title h1 {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }

    .time-display {
        font-size: 1.6rem;
    }

    .logo-section {
        flex-direction: column;
        gap: 10px;
    }

    .quote-qrcode-row {
        flex-direction: column;
    }

    .qrcode-card {
        min-width: auto;
        width: auto;
    }

    .qrcode-img {
        width: 120px;
        height: 120px;
    }
}