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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a2e;
}

.auth-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: #666;
}

.auth-form {
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.captcha-container {
    display: flex;
    gap: 10px;
}

.captcha-container input {
    flex: 1;
}

.captcha-image {
    height: 46px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #1a1a2e;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: #1a1a2e;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9em;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer span {
    color: #999;
    margin: 0 10px;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffd700;
}

.username {
    font-weight: 600;
}

.username.vip {
    color: #ff4444;
}

.username.svip {
    color: #ffd700;
}

.points-display {
    background: rgba(255, 215, 0, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.points-display .icon {
    color: #ffd700;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 1.2em;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    z-index: 200;
    transition: left 0.3s;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5em;
    cursor: pointer;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-section-title {
    padding: 10px 20px;
    font-size: 0.85em;
    color: #999;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #e0e0e0;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item .icon {
    width: 24px;
    text-align: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

.card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.marquee {
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% 100%;
    animation: marqueeBg 2s linear infinite;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.marquee-content {
    white-space: nowrap;
    animation: marquee 15s linear infinite;
    color: #1a1a2e;
    font-weight: 600;
}

@keyframes marqueeBg {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9em;
    position: relative;
}

.calendar-day.today {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
}

.calendar-day.checked {
    background: rgba(76, 175, 80, 0.2);
}

.calendar-day.checked::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    color: #4caf50;
    font-size: 0.8em;
    font-weight: bold;
}

.calendar-day-header {
    font-weight: bold;
    color: #ffd700;
    background: transparent;
}

.checkin-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.1em;
}

.rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.ranking-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9em;
}

.ranking-number-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
}

.ranking-number-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #1a1a2e;
}

.ranking-number-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: white;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 30px auto;
}

.lottery-item {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid transparent;
    transition: all 0.1s;
}

.lottery-item.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.lottery-item.center {
    grid-column: 2;
    grid-row: 2;
}

.lottery-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.lottery-name {
    font-size: 0.8em;
    text-align: center;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: #999;
    font-size: 1.5em;
    cursor: pointer;
}

.modal-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #ffd700;
    text-align: center;
}

.member-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.member-badges {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.member-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

.member-badge.vip {
    background: linear-gradient(135deg, #ff4444, #cc0000);
}

.member-badge.svip {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
}

.exp-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.exp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    border-radius: 5px;
    transition: width 0.3s;
}

.chat-container {
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 10px;
}

.chat-bubble {
    max-width: 60%;
    padding: 12px 15px;
    border-radius: 15px;
    position: relative;
}

.chat-message:not(.own) .chat-bubble {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-bottom-left-radius: 5px;
}

.chat-message.own .chat-bubble {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-username {
    font-size: 0.85em;
    margin-bottom: 5px;
}

.chat-time {
    font-size: 0.75em;
    opacity: 0.7;
    margin-top: 5px;
}

.time-divider {
    text-align: center;
    margin: 20px 0;
}

.time-divider span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85em;
}

.chat-input-container {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1em;
    resize: none;
    max-height: 100px;
}

.chat-input:focus {
    outline: none;
    border-color: #ffd700;
}

.chat-input-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 0;
}

.admin-nav-item {
    display: block;
    padding: 15px 25px;
    color: #e0e0e0;
    text-decoration: none;
    transition: background 0.3s;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255, 215, 0, 0.2);
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
}

.stat-label {
    color: #999;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    color: #ffd700;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge-leader {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.badge-coleader {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.badge-elder {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.badge-member {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 25px;
    }
    
    .rankings {
        grid-template-columns: 1fr;
    }
    
    .chat-bubble {
        max-width: 80%;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
    }
}
