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

:root {
    --calligraphy-gold: #c9a227;
    --calligraphy-dark: #2d1b0e;
    --calligraphy-red: #b72424;
    --calligraphy-paper: #f8f5f0;
    --calligraphy-ink: #1a1a1a;
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f8f5f0 0%, #f0e8d9 100%);
    font-family: 'Noto Serif SC', serif;
    font-size: 15px;
    color: var(--calligraphy-ink);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(ellipse at 10% 20%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(183, 36, 36, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#page-content {
    animation: fadeInUp 0.6s ease-out;
    position: relative;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar {
    background: linear-gradient(135deg, var(--calligraphy-dark) 0%, #4a2f1d 100%) !important;
    box-shadow: 0 4px 20px rgba(45, 27, 14, 0.3);
    border-bottom: 3px solid var(--calligraphy-gold);
}

.navbar-brand {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem !important;
    color: var(--calligraphy-gold) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.nav-link {
    color: rgba(248, 245, 240, 0.9) !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--calligraphy-gold) !important;
    transform: translateY(-2px);
}

.hero-section {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.hero-section::before {
    content: '墨韵';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 12rem;
    color: rgba(201, 162, 39, 0.06);
    pointer-events: none;
    z-index: 0;
}

.hero-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--calligraphy-gold) 0%, #e6c65b 50%, var(--calligraphy-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #5a4837;
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
}

.entry-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid transparent;
    background: linear-gradient(135deg, #ffffff 0%, #faf7f2 100%);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--calligraphy-gold) 0%, #e6c65b 50%, var(--calligraphy-gold) 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.entry-card:hover::before {
    transform: scaleX(1);
}

.entry-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(45, 27, 14, 0.25);
    border-color: var(--calligraphy-gold);
}

.entry-icon {
    font-size: 4rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--calligraphy-gold) 0%, #e6c65b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bounceSlow 3s ease-in-out infinite;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.entry-card:nth-child(1) .entry-icon { animation-delay: 0s; }
.entry-card:nth-child(2) .entry-icon { animation-delay: 0.2s; }
.entry-card:nth-child(3) .entry-icon { animation-delay: 0.4s; }
.entry-card:nth-child(4) .entry-icon { animation-delay: 0.6s; }

.card-title {
    font-family: 'Noto Serif SC', serif;
    font-weight: 600;
    color: var(--calligraphy-dark);
    font-size: 1.4rem;
}

.success-icon {
    font-size: 5rem;
    background: linear-gradient(135deg, #198754 0%, #28a745 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: successPop 0.6s ease-out;
}

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

.form-card {
    background: linear-gradient(135deg, #ffffff 0%, #faf7f2 100%);
    border: 2px solid rgba(201, 162, 39, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(45, 27, 14, 0.1);
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--calligraphy-gold) 0%, #e6c65b 50%, var(--calligraphy-gold) 100%);
}

.form-label {
    font-weight: 600;
    color: var(--calligraphy-dark);
    font-size: 0.95rem;
}

.form-control, .form-select {
    border: 2px solid rgba(201, 162, 39, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #fefefe;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--calligraphy-gold);
    box-shadow: 0 0 0 0.25rem rgba(201, 162, 39, 0.25);
}

.btn-calligraphy {
    background: linear-gradient(135deg, var(--calligraphy-gold) 0%, #d4af37 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-calligraphy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-calligraphy:hover::before {
    left: 100%;
}

.btn-calligraphy:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.5);
}

.btn-outline-calligraphy {
    border: 2px solid var(--calligraphy-gold);
    color: var(--calligraphy-gold);
    background: transparent;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-calligraphy:hover {
    background: var(--calligraphy-gold);
    color: white;
    transform: translateY(-2px);
}

.prize-result-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fffaf0 100%);
    border: 3px solid var(--calligraphy-red);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(183, 36, 36, 0.15);
}

.prize-badge {
    background: linear-gradient(135deg, var(--calligraphy-red) 0%, #dc3545 100%);
    padding: 8px 24px;
    border-radius: 30px;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(183, 36, 36, 0.4);
}

.footer {
    margin-top: auto;
    background: linear-gradient(135deg, var(--calligraphy-dark) 0%, #4a2f1d 100%);
    border-top: 3px solid var(--calligraphy-gold);
}

.footer small {
    color: rgba(248, 245, 240, 0.7);
}

.admin-card {
    background: linear-gradient(135deg, #ffffff 0%, #faf7f2 100%);
    border: 2px solid rgba(201, 162, 39, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(45, 27, 14, 0.1);
}

.stat-card {
    background: linear-gradient(135deg, var(--calligraphy-dark) 0%, #4a2f1d 100%);
    border: 3px solid var(--calligraphy-gold);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 30px rgba(45, 27, 14, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(45, 27, 14, 0.4);
}

.stat-card h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    color: var(--calligraphy-gold);
}

.card-preview {
    border: 3px dashed var(--calligraphy-gold);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
}

@media (min-width: 768px) {
    body { font-size: 14px; }
    .hero-title { font-size: 5rem; }
}

@media (max-width: 767.98px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .entry-icon {
        font-size: 3rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-section {
        padding: 40px 15px;
    }

    .form-control, .form-select {
        font-size: 16px;
    }
}

@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }

    .card-sheet {
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 0;
        page-break-after: always;
    }

    body {
        color: #000;
        background: #fff;
    }
}
