/**
 * 基础CSS样式
 * 替代内联样式，保持现有设计
 */

/* 响应式布局 - 来自原始 /c.css */
@media (min-width: 768px) {
    div {
        margin: 0 auto;
        width: 414px;
    }
}

/* 基础样式重置 */
* {
    word-break: break-all;
    word-wrap: break-word;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Helvetica Neue", "Noto Sans CJK SC", Arial, sans-serif;
}

/* 链接样式 */
a:link, a:visited, a:active, button.link {
    color: #0000ee;
}

a:hover, a:focus, button.link:focus {
    color: #ee0000;
}

/* 按钮样式 */
button.link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

button.link:focus {
    outline-style: dotted;
    outline-width: 0;
}

/* 游戏专用样式 - 来自原始 parent.twig */
.pink-text {
    color: #FFC0CB;
}

/* VIP等级动画 */
@keyframes vip-colors {
    0% { color: grey; }
    10% { color: lightgrey; }
    20% { color: blue; }
    30% { color: lightblue; }
    40% { color: green; }
    50% { color: lightgreen; }
    60% { color: yellow; }
    70% { color: lightyellow; }
    80% { color: orange; }
    90% { color: red; }
    100% { color: purple; }
}

.vip-label {
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
    padding: 2px 4px;
    border-radius: 3px;
}

.vip0 { color: grey; }
.vip1 { color: lightgrey; }
.vip2 { color: blue; }
.vip3 { color: lightblue; }
.vip4 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -8s; }
.vip5 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -10s; }
.vip6 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -12s; }
.vip7 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -14s; }
.vip8 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -16s; }
.vip9 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -18s; }
.vip10 { animation: vip-colors 20s steps(10, end) infinite; animation-delay: -20s; }

/* ==================== 水墨风格登录页面样式 ==================== */

/* 水墨风格登录页面 */
.ink-container {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(45deg, #f5f5f0 0%, #e8e8e0 100%);
    padding: 10px;
    overflow: hidden;
}

/* 水墨背景装饰 */
.ink-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0,0,0,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0,0,0,0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0,0,0,0.02) 0%, transparent 30%);
    z-index: -1;
}

/* 水墨纸质纹理 */
.paper-texture {
    background: 
        radial-gradient(circle at 25% 25%, #f8f8f3 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #f0f0eb 0%, transparent 50%),
        linear-gradient(0deg, #fafaf8 0%, #f5f5f0 100%);
    box-shadow: 
        inset 0 0 60px rgba(0,0,0,0.08),
        0 0 40px rgba(0,0,0,0.02);
}

/* 主内容区域 - 适配414px宽度限制 */
.login-scroll {
    width: calc(100% - 20px);
    max-width: 394px;
    margin: 0 auto;
    background: 
        radial-gradient(circle at 30% 20%, rgba(139, 69, 19, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(101, 67, 33, 0.02) 0%, transparent 40%),
        linear-gradient(135deg, rgba(245, 245, 240, 0.98) 0%, rgba(240, 240, 235, 0.95) 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.6),
        inset 0 0 20px rgba(139, 69, 19, 0.02);
    border: 1px solid rgba(139, 69, 19, 0.1);
    position: relative;
}

/* 水墨边框装饰 */
.login-scroll::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: 
        radial-gradient(circle at 10% 10%, rgba(139, 69, 19, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(101, 67, 33, 0.08) 0%, transparent 25%),
        linear-gradient(45deg, rgba(139, 69, 19, 0.02), rgba(101, 67, 33, 0.03));
    border-radius: 14px;
    z-index: -1;
}

/* LOGO样式 - 适配手机尺寸 */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.logo-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
    margin-bottom: 15px;
}

/* 诗词区域 - 手机优化 */
.poetry-section {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.poetry-line {
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
    margin: 6px 0;
    font-family: "PingFang SC", "Hiragino Sans GB", "KaiTi", "楷体", "STKaiti", "Noto Serif CJK SC", serif;
    position: relative;
    opacity: 0;
    animation: fadeInPoetry 1s ease-out forwards;
}

.poetry-line:nth-child(1) { animation-delay: 0.5s; }
.poetry-line:nth-child(2) { animation-delay: 0.8s; }
.poetry-line:nth-child(3) { animation-delay: 1.1s; }
.poetry-line:nth-child(4) { animation-delay: 1.4s; }
.poetry-line:nth-child(5) { animation-delay: 1.7s; }

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

/* 印章样式装饰 - 手机适配 */
.seal-decoration {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #d63031;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    font-weight: bold;
    box-shadow: 2px 2px 6px rgba(214, 48, 49, 0.3);
    opacity: 0;
    animation: sealAppear 0.5s ease-out 2s forwards;
}

@keyframes sealAppear {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* 表单区域 - 手机优化，水墨风格 */
.form-container {
    background: 
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.9) 0%, rgba(248, 248, 243, 0.85) 100%);
    border-radius: 8px;
    padding: 15px 12px;
    margin: 15px 0;
    box-shadow: 
        0 4px 10px rgba(139, 69, 19, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.8),
        inset 0 0 15px rgba(139, 69, 19, 0.02);
    border: 1px solid rgba(139, 69, 19, 0.08);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #2d3436;
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.form-label::before {
    content: '●';
    color: #636e72;
    margin-right: 8px;
    font-size: 8px;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 6px;
    font-size: 16px;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 243, 0.9) 100%);
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 1px 3px rgba(139, 69, 19, 0.1),
        inset 0 0 8px rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: rgba(139, 69, 19, 0.4);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 
        inset 0 1px 3px rgba(139, 69, 19, 0.15),
        inset 0 0 8px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(139, 69, 19, 0.1);
    transform: translateY(-1px);
}

/* 按钮样式 - 水墨风格 */
.login-button {
    width: 100%;
    padding: 12px;
    background: 
        radial-gradient(circle at 30% 30%, rgba(139, 69, 19, 0.9) 0%, rgba(101, 67, 33, 0.95) 100%),
        linear-gradient(135deg, rgba(62, 39, 35, 0.95) 0%, rgba(45, 52, 54, 0.9) 100%);
    color: rgba(245, 245, 240, 0.95);
    border: 1px solid rgba(139, 69, 19, 0.3);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(139, 69, 19, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 0 10px rgba(139, 69, 19, 0.1);
    position: relative;
    overflow: hidden;
}

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

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(139, 69, 19, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 0 12px rgba(139, 69, 19, 0.15);
}

.login-button:hover::before {
    left: 100%;
}

.login-button:active {
    transform: translateY(0);
}

/* 错误消息样式 */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
    font-size: 14px;
    animation: errorShake 0.5s ease-out;
}

@keyframes errorShake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}

/* 注册链接 */
.register-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.register-link {
    color: #74b9ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.register-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #74b9ff;
    transition: width 0.3s ease;
}

.register-link:hover {
    color: #0984e3;
}

.register-link:hover::after {
    width: 100%;
}

/* 移除响应式设计 - 专注手机端 */

/* 页面加载动画 */
.ink-container {
    animation: pageLoad 1s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
