/*
 * 宇宙第一文字网游 - 现代科技主题
 * Modern Gaming Theme - Dark Blue Gradient with Cyan Glow
 */

:root {
    /* 科技色彩系统 */
    --primary-cyan: #00ffff;
    --primary-blue: #0088ff;
    --primary-dark: #0a0e27;
    --primary-darker: #1a1a3e;
    --primary-darkest: #0f0f1e;

    --text-primary: #e0e0ff;
    --text-secondary: #8899bb;
    --border-glow: rgba(0, 255, 255, 0.3);
    --border-glow-bright: rgba(0, 255, 255, 0.8);

    --success: #00ffaa;
    --warning: #ffaa00;
    --error: #ff3366;
}

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 50%, var(--primary-darkest) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: "Noto Sans SC", "Arial", sans-serif;
    line-height: 1.6;
    letter-spacing: 0.5px;
    min-height: 100vh;
    position: relative;
}

/* 背景动画效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 127, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 容器 */
.container, .container-narrow, .container-fluid {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
}

.container-narrow {
    max-width: 600px;
}

/* 头部样式 */
.header {
    padding: 30px 0;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-glow);
    background: rgba(0, 0, 0, 0.2);
}

.header .logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto 15px;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.4));
    object-fit: contain;
}

.header-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-cyan);
    text-shadow:
        0 0 10px var(--primary-cyan),
        0 0 20px var(--primary-blue),
        0 0 30px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.header-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* 按钮系统 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-size: 15px;
}

.btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, #00ccff 100%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 136, 255, 0.2) 100%);
    color: var(--primary-cyan);
    border: 2px solid var(--border-glow);
}

.btn-secondary:hover {
    border-color: var(--border-glow-bright);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 136, 255, 0.3) 100%);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3366 0%, #ff1144 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.6);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #00ffaa 0%, #00dd88 100%);
    color: #000;
}

.btn-success:hover {
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.6);
}

/* 卡片样式 */
.card, .login-card {
    background: linear-gradient(135deg, #1a1f4d 0%, #0f1847 100%);
    border: 2px solid var(--border-glow);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card::before, .login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.card:hover, .login-card:hover {
    border-color: var(--border-glow-bright);
    background: linear-gradient(135deg, #2a2f5d 0%, #1f2857 100%);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    transform: translateY(-8px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-glow);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-glow-bright);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-cyan);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* 输入组 */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--primary-cyan);
    font-size: 16px;
    z-index: 2;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.form-control-with-icon {
    padding-left: 40px;
}

/* 错误信息 */
.error-message {
    background: rgba(255, 51, 102, 0.1);
    color: #ff3366;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #ff3366;
    margin: 20px 0;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.success-message {
    background: rgba(0, 255, 170, 0.1);
    color: #00ffaa;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #00ffaa;
    margin: 20px 0;
    font-size: 14px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 选择器 */
.selector {
    margin: 20px 0;
}

.selector-label {
    display: block;
    margin-bottom: 12px;
    color: var(--primary-cyan);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.zone-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.zone-btn {
    padding: 10px 12px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--border-glow);
    border-radius: 8px;
    color: var(--primary-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.zone-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--border-glow-bright);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.zone-btn.active {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
    color: #000;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* 分隔符 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
    margin: 20px 0;
}

.divider-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin: 20px 0;
}

/* 链接 */
a {
    color: var(--primary-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

a:hover {
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

/* 文本样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    margin-bottom: 15px;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

.text-muted {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--error);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 20px 0;
    }

    .header .logo {
        max-width: 100px;
        height: auto;
    }

    .header-title {
        font-size: 22px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .card, .login-card {
        padding: 20px;
    }

    .container, .container-narrow {
        padding: 8px;
    }

    .zone-selector {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 0;
    }

    .header .logo {
        max-width: 80px;
        height: auto;
    }

    .header-title {
        font-size: 18px;
    }

    .header-subtitle {
        font-size: 11px;
    }

    .card, .login-card {
        padding: 15px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .container, .container-narrow {
        padding: 5px;
    }
}

/* 旧的 classical 样式兼容性 */
.classical-pattern {
    background: inherit;
}

.classical-border {
    border: 2px solid var(--border-glow);
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* 禁用古典主题的颜色 */
body {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 50%, var(--primary-darkest) 100%) !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(0, 0, 0, 0.3) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}
