/* 林的遗产 - ARG 游戏样式 */

/* CSS 变量定义 */
:root {
    --bg-color: #f5f5dc;        /* 米色/羊皮纸色 */
    --text-color: #2c241b;      /* 深棕色 */
    --accent-color: #8b4513;    /* 马鞍棕 */
    --hover-color: #a0522d;     /* 赭色 */
    --error-color: #8b0000;     /* 暗红色 */
    --success-color: #d4af37;   /* 金色 */
    --font-main: 'Courier New', Courier, monospace;
    --font-handwriting: 'Indie Flower', cursive;
    --font-serif: 'Georgia', serif;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    background-image: url('../images/paper-bg.jpg');
    background-size: cover;
    background-attachment: fixed;
}

/* 容器样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: rgba(245, 245, 220, 0.9);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h1 {
    font-family: var(--font-serif);
    text-align: center;
    margin-bottom: 30px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 15px;
}

h2 {
    font-family: var(--font-serif);
    color: var(--accent-color);
    margin: 20px 0 10px;
}

/* 段落样式 */
p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 链接样式 */
a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
    border-bottom-color: var(--hover-color);
}

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 10px;
    font-family: var(--font-main);
    font-size: 16px;
    color: var(--bg-color);
    background-color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* 图标样式 */
.icon {
    display: block;
    margin: 20px auto;
    text-align: center;
    font-size: 48px;
}

.icon-clickable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.icon-clickable:hover {
    transform: scale(1.1);
}

/* 保险箱页面样式 */
.safe-container {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #3d2817 0%, #2c1e12 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.safe-icon {
    font-size: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.dials-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.dial {
    width: 60px;
    height: 80px;
    background: linear-gradient(180deg, #5a4a3a 0%, #3d2f22 100%);
    border: 2px solid #8b7355;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
}

.dial:hover {
    border-color: var(--success-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.dial.selected {
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
}

.dial.correct {
    border-color: #22c55e;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}

.dial.wrong {
    animation: shake 0.3s ease;
    border-color: var(--error-color);
}

.dial-upper, .dial-lower {
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #d4c4a8;
    transition: transform 0.15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dial-upper {
    border-bottom: 1px solid #5a4a3a;
    background: linear-gradient(180deg, #6b5b4a 0%, #5a4a3a 100%);
}

.dial-lower {
    background: linear-gradient(180deg, #4a3a2a 0%, #3d2f22 100%);
}

.dial-upper:active {
    transform: scaleY(0.9);
}

.dial-lower:active {
    transform: scaleY(0.9);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.password-display {
    font-size: 24px;
    letter-spacing: 10px;
    margin: 20px 0;
    color: var(--success-color);
    font-family: 'Courier New', monospace;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-weight: bold;
}

.message.success {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}

.message.error {
    color: var(--error-color);
    background-color: rgba(139, 0, 0, 0.1);
}

/* 笔记页面样式 */
.note-container {
    background-color: #fffef5;
    padding: 30px;
    transform: rotate(-1deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
}

.note-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 24px,
        #a0c4e8 24px,
        #a0c4e8 25px
    );
    pointer-events: none;
    opacity: 0.3;
}

.tag-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.tag {
    background-color: #fffbf0;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.tag-highlight {
    background-color: #ffe4e1;
    border-color: #ffb6c1;
}

.scribble {
    font-family: var(--font-handwriting);
    font-size: 18px;
    color: #5a4a3a;
    margin: 15px 0;
    position: relative;
    z-index: 1;
}

/* 日记页面样式 */
.diary-container {
    background-color: #fdf6e3;
    padding: 40px;
    font-family: var(--font-handwriting);
    font-size: 18px;
    line-height: 2;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.diary-container::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e8dcc4;
}

.diary-date {
    color: #8b7355;
    font-style: italic;
    margin-bottom: 20px;
}

.page-number {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 14px;
    color: #a08868;
}

/* 信件页面样式 */
.letter-container {
    background-color: #f8f4e8;
    padding: 40px;
    position: relative;
}

.letter-container::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid #d4c4a8;
    pointer-events: none;
}

.letter-content {
    position: relative;
    z-index: 1;
}

.circuit-description {
    background-color: #2c241b;
    color: #d4c4a8;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 14px;
}

/* 电路板页面样式 */
.circuit-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 30px;
    border-radius: 10px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

.circuit-board {
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 20px;
    border: 2px solid #00ff00;
    border-radius: 5px;
}

.circuit-label {
    margin: 10px 0;
    padding: 5px 10px;
    background-color: rgba(0, 255, 0, 0.1);
    border-left: 3px solid #00ff00;
}

.circuit-highlight {
    color: #ffff00;
    font-weight: bold;
    font-size: 16px;
}

.circuit-note {
    color: #00ffff;
    font-size: 12px;
    margin-top: 5px;
}

/* 照片页面样式 */
.photo-container {
    text-align: center;
    padding: 30px;
}

.photo-frame {
    display: inline-block;
    padding: 15px;
    background-color: #f0e6d8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(2deg);
}

.photo {
    max-width: 100%;
    height: auto;
    filter: sepia(80%) grayscale(20%);
    border: 1px solid #ccc;
}

.photo-text {
    font-family: var(--font-handwriting);
    font-size: 20px;
    color: #5a4a3a;
    margin-top: 15px;
}

.photo-back {
    background-color: #2c241b;
    color: #d4c4a8;
    padding: 30px;
    margin-top: 20px;
    border-radius: 5px;
    text-align: left;
}

.scratch-mark {
    color: #8b7355;
    font-size: 14px;
    margin-top: 20px;
    font-style: italic;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-family: var(--font-serif);
    color: var(--accent-color);
    margin-bottom: 15px;
}

.modal-close {
    float: right;
    cursor: pointer;
    font-size: 24px;
    color: var(--accent-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .dials-container {
        gap: 10px;
    }
    
    .dial {
        width: 50px;
        height: 70px;
    }
    
    .tag-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    h1 {
        font-size: 24px;
    }
}

/* 导航栏样式 */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* 进度指示器 */
.progress-indicator {
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    color: var(--accent-color);
}

/* 装饰元素 */
.decorative-border {
    border: 3px double var(--accent-color);
    padding: 20px;
    margin: 20px 0;
}

.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
