/* =========================================
   🎨 THEME & VARIABLES
   ========================================= */
:root {
    --bg-color: #2c3e50;
    --receipt-bg: #fff;
    --text-primary: #333;
    --text-secondary: #666;
    --accent-font: 'Impact', sans-serif;
    --mono-font: 'Courier New', monospace;
    --base-font: 'Microsoft YaHei', sans-serif;
    
    --spacing-sm: 5px;
    --spacing-md: 10px;
    --spacing-lg: 20px;
    --receipt-width: 380px;
}

/* =========================================
   🛠 RESET & LAYOUT
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    font-family: var(--mono-font), var(--base-font);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
    color: var(--text-primary);
}

/* =========================================
   🧾 RECEIPT CONTAINER
   ========================================= */
.receipt-container {
    background: var(--receipt-bg);
    width: 100%;
    max-width: var(--receipt-width);
    padding: 30px 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    filter: drop-shadow(0px 2px 3px rgba(0,0,0,0.2));
}

/*锯齿边缘效果*/
.receipt-container::before,
.receipt-container::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 10px;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(135deg, transparent 33%, var(--receipt-bg) 33%, var(--receipt-bg) 66%, transparent 66%),
        linear-gradient(45deg, transparent 33%, var(--receipt-bg) 33%, var(--receipt-bg) 66%, transparent 66%);
}

.receipt-container::before { top: -10px; background-position: top; }
.receipt-container::after { bottom: -10px; background-position: bottom; transform: rotate(180deg); }

/* =========================================
   📝 TYPOGRAPHY & COMPONENTS
   ========================================= */
.header { 
    text-align: center; 
    margin-bottom: var(--spacing-lg); 
    border-bottom: 2px dashed var(--text-primary); 
    padding-bottom: 15px; 
}

.title { 
    font-size: 24px; 
    font-weight: 900; 
    letter-spacing: 2px; 
    margin-bottom: var(--spacing-sm); 
    text-transform: uppercase; 
}

.sub-title { font-size: 12px; color: var(--text-secondary); }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }

.divider { border-top: 1px dashed var(--text-primary); margin: 15px 0; width: 100%; }
.double-divider { border-top: 3px double var(--text-primary); margin: 15px 0; }

.row { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    margin-bottom: 8px; 
    font-size: 14px; 
}
.row.large { margin-top: 5px; align-items: center; }
.row.center-row { justify-content: center; }

.label { font-weight: bold; color: #000; }
.value { text-align: right; width: 100%; }

.highlight-num { 
    font-size: 28px; 
    font-weight: bold; 
    font-family: var(--accent-font); 
}
.highlight-num span { 
    font-size: 14px; 
    font-weight: normal; 
    font-family: var(--mono-font); 
    margin-left: 2px; 
}
.highlight-num.large-text { font-size: 24px; }

.countdown-section { margin-top: 5px; }
.event-name { font-weight: bold; font-size: 16px; margin-bottom: 2px; }
.date-small { font-size: 12px; color: var(--text-secondary); }
.small-text { font-size: 12px; }

/* =========================================
   🎨 GRAPHICS & ANIMATION
   ========================================= */
.barcode { 
    height: 40px; 
    width: 100%; 
    margin-top: 20px; 
    opacity: 0.8; 
    display: block; 
}

.footer-text { 
    text-align: center; 
    font-size: 12px; 
    margin-top: 10px; 
    font-weight: bold; 
}

.heart-icon { 
    display: inline-block; 
    color: #000; 
    animation: blink 1s infinite; 
}

@keyframes blink { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0.3; } 
}
/* =========================================
   📝 INPUT FORM STYLES (新增：用于留言板)
   ========================================= */
.input-group { margin-bottom: 10px; }

/* 让输入框看起来像填空横线 - 统一样式 */
input, textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #000;
    font-family: var(--mono-font);
    font-size: 14px;
    padding: 5px 0;
    outline: none;
    resize: none;
    color: var(--text-primary);
}

input::placeholder, textarea::placeholder {
    color: #aaa;
    font-size: 12px;
    font-style: italic;
}

button {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 10px;
    font-family: var(--mono-font);
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
    letter-spacing: 1px;
    transition: opacity 0.2s;
}
button:hover { opacity: 0.8; }
button:disabled { background: #999; cursor: not-allowed; }

/* =========================================
   💬 MESSAGE LIST STYLES (新增：用于留言列表)
   ========================================= */
.message-item {
    margin-bottom: 15px;
    animation: printIn 0.5s ease forwards;
}

.msg-content {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 5px;
    margin-bottom: 5px;
    white-space: pre-wrap;
    word-break: break-all;
}

.msg-meta {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
}

/* 打印机出纸动画 */
@keyframes printIn { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}