/* Public Homepage Styles - Full Screen Layout */

/* Hero Section - Split Layout */
.public-hero {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

/* Left side - Rankings Area with Gradient Background */
.hero-left {
    display: none;
    width: 58.33%;
    position: relative;
    background: #ffffff;
    padding: 32px;
    overflow: visible;
    min-height: 100vh;
    height: 100vh;
}

/* Blob backgrounds removed - using white background */

.hero-content-left {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    /* 创建新的层叠上下文，确保子元素的z-index独立 */
    isolation: isolate;
}


/* Character Image Layer - Default Top Layer */
.character-image-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    transition: z-index 0s, filter 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.character-image-layer > * {
    pointer-events: auto;
}

.character-image-layer.active {
    z-index: 10;
    opacity: 1;
    visibility: visible;
}

/* Behind state removed - using modal approach */

/* 图片背景 */
.character-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url('../imgs/character.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* Blur background removed - using modal approach */

/* Hero Action Buttons Container */
.hero-action-buttons {
    position: fixed !important;
    top: 30px !important;
    left: 30px !important;
    display: flex !important;
    gap: 12px !important;
    z-index: 99999 !important;
}

/* Hero Action Button Style */
.hero-action-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 14px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !important;
    transition: all 0.3s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    pointer-events: auto !important;
    outline: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    touch-action: manipulation !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap;
}

.hero-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.hero-action-btn i {
    font-size: 16px;
}

/* Different colors for different buttons */
#settingsToggleBtn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
}

#settingsToggleBtn:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

#updatesToggleBtn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4) !important;
}

#updatesToggleBtn:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* ========== Ranking Modal Styles ========== */
.ranking-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.ranking-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ranking-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ranking-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-modal-title i {
    font-size: 22px;
}

.ranking-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ranking-modal-close i {
    font-size: 18px;
}

/* Tab Navigation */
.ranking-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f1f5f9;
    overflow-x: auto;
    flex-shrink: 0;
}

.ranking-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ranking-tab:hover {
    background: #e2e8f0;
    color: #334155;
}

.ranking-tab.active {
    background: #6366f1;
    color: #fff;
}

.ranking-tab i {
    font-size: 14px;
}

/* Tab Content */
.ranking-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Ranking Panel */
.ranking-panel {
    display: none;
    flex-direction: column;
    height: 100%;
}

.ranking-panel.active {
    display: flex;
}

.ranking-panel-header {
    padding: 16px 20px;
    color: #fff;
}

.ranking-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-panel-header.pvp { background: linear-gradient(135deg, #c62828 0%, #e53935 100%); }
.ranking-panel-header.level { background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%); }
.ranking-panel-header.enhance { background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%); }
.ranking-panel-header.pk { background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%); }
.ranking-panel-header.coins { background: linear-gradient(135deg, #00838f 0%, #00acc1 100%); }
.ranking-panel-header.have { background: linear-gradient(135deg, #4527a0 0%, #5e35b1 100%); }

.ranking-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Ranking List */
.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background 0.2s ease;
}

.ranking-list li:hover {
    background: #f8fafc;
}

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

.ranking-list li.no-data {
    justify-content: center;
    color: #94a3b8;
    padding: 40px 20px;
}

.rank-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 16px;
}

.ranking-list li:nth-child(1) .rank-num {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #fff;
}

.ranking-list li:nth-child(2) .rank-num {
    background: linear-gradient(135deg, #c0c0c0 0%, #9e9e9e 100%);
    color: #fff;
}

.ranking-list li:nth-child(3) .rank-num {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    color: #fff;
}

.rank-name {
    flex: 1;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.rank-item {
    font-size: 12px;
    color: #64748b;
    margin-right: 12px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-value {
    font-weight: 700;
    color: #6366f1;
    font-size: 14px;
}

/* Right side - Login Form */
.hero-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #ffffff;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
}

/* Login Panel */
.login-panel {
    width: 100%;
    max-width: 448px;
}

.login-brand {
    margin-bottom: 32px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #9333ea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.brand-icon i {
    font-size: 20px;
    color: #fff;
}

.login-header {
    margin-bottom: 32px;
}

.login-title {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.login-error-msg {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #fecaca;
    animation: shake 0.5s ease-in-out;
}

.login-error-msg i {
    font-size: 16px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.form-group:last-of-type {
    margin-bottom: 0;
}

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

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.form-input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
}

.password-toggle:hover {
    color: #64748b;
}

.password-toggle i {
    font-size: 18px;
}

/* Captcha Row */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-row img {
    height: 44px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.captcha-input {
    flex: 1;
}

.captcha-refresh {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
}

.captcha-refresh:hover {
    background: #f8fafc;
    border-color: #6366f1;
    color: #6366f1;
}

.captcha-refresh i {
    font-size: 16px;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6366f1;
    margin: 0;
}

.remember-me label {
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    user-select: none;
}

.forgot-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Login Button - Gradient Style */
.btn-login {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #6366f1 0%, #9333ea 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-login:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7e22ce 100%);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

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

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

/* Login Footer */
.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #475569;
    font-weight: 400;
}

.register-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.register-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Rankings Grid */
.rankings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.ranking-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.ranking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ranking-card .card-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ranking-card .card-header.pvp {
    background: linear-gradient(135deg, #c62828 0%, #e53935 100%);
}

.ranking-card .card-header.level {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
}

.ranking-card .card-header.enhance {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
}

.ranking-card .card-header.pk {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
}

.ranking-card .card-header.online {
    background: linear-gradient(135deg, #00838f 0%, #00acc1 100%);
}

.ranking-card .card-header.clan {
    background: linear-gradient(135deg, #4527a0 0%, #5e35b1 100%);
}

.ranking-card .card-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-card .card-header .view-all {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.ranking-card .card-header .view-all:hover {
    color: #fff;
}

.ranking-card .card-body {
    padding: 0;
}

.ranking-card .rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ranking-card .rank-list li {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.ranking-card .rank-list li:last-child {
    border-bottom: none;
}

.ranking-card .rank-list li:hover {
    background: #f8f9fa;
}

.ranking-card .rank-list .rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 12px;
}

.ranking-card .rank-list li:nth-child(1) .rank-num {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #fff;
}

.ranking-card .rank-list li:nth-child(2) .rank-num {
    background: linear-gradient(135deg, #c0c0c0 0%, #9e9e9e 100%);
    color: #fff;
}

.ranking-card .rank-list li:nth-child(3) .rank-num {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    color: #fff;
}

.ranking-card .rank-list .player-name {
    flex: 1;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-card .rank-list .player-value {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
}

.ranking-card .rank-list .player-clan {
    font-size: 11px;
    color: #999;
    margin-left: 5px;
}

.ranking-card .rank-list .player-item {
    display: inline;
    font-size: 12px;
    color: #f57c00;
    font-weight: normal;
    margin-left: 8px;
}

.ranking-card .rank-list .player-item::before {
    content: '[';
}

.ranking-card .rank-list .player-item::after {
    content: ']';
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.quick-link {
    flex: 1;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #333;
}

.quick-link i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.quick-link.download i { color: #4caf50; }
.quick-link.register i { color: #2196f3; }
.quick-link.discord i { color: #7289da; }
.quick-link.guide i { color: #ff9800; }

.quick-link span {
    font-weight: bold;
    font-size: 14px;
}

/* Footer Credits */
.public-footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
}

/* Responsive Adjustments */
@media (min-width: 1024px) {
    .hero-left {
        display: flex;
        flex-direction: column;
    }
    
    .public-hero {
        min-height: 100vh;
        height: 100vh;
    }
}

@media (max-width: 1023px) {
    .public-hero {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }
    
    .hero-left {
        display: none;
    }
    
    .hero-right {
        width: 100%;
        padding: 32px 24px;
        min-height: 100vh;
        height: auto;
    }
    
    .rankings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-right {
        padding: 24px 16px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .hero-welcome-title {
        font-size: 28px;
    }
    
    .hero-welcome-subtitle {
        font-size: 16px;
    }
    
    .ranking-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .ranking-menu-overlay {
        padding: 20px;
        max-width: 300px;
    }
    
    .ranking-menu-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .ranking-menu-item {
        padding: 12px;
    }
    
    .ranking-menu-item i {
        font-size: 20px;
    }
    
    .ranking-menu-item span {
        font-size: 12px;
    }
    
    .hero-action-buttons {
        top: 15px;
        left: 15px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .hero-action-btn {
        padding: 10px 14px !important;
        font-size: 12px !important;
    }
    
    .hero-action-btn span {
        display: none;
    }
    
    .hero-action-btn i {
        font-size: 16px;
    }
}

/* Override for public page - Full screen, no background */
section.public-home {
    min-height: 100vh !important;
    height: 100vh !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Override body background for public home */
body.public-home {
    background: #fff !important;
    background-image: none !important;
    padding-top: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

html body.public-home {
    overflow: hidden;
    height: 100vh;
}

/* Hide footer on public home */
section.public-home ~ footer.modern-footer,
body.public-home footer.modern-footer {
    display: none !important;
}

/* Modern Footer Styles */
footer.modern-footer {
    width: 100%;
    padding: 30px 0 40px;
    margin-top: -10px;
    text-align: center;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.3) 30%,
        rgba(0, 0, 0, 0.6) 100%);
    position: relative;
}

footer.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
}

footer.modern-footer .footer-content {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ========== Modern Dashboard Styles ========== */

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.sidebar-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* User Info */
.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.user-balance {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.user-balance span {
    color: #10b981;
    font-weight: 600;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

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

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    text-decoration: none;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #6366f1;
}

.nav-item.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Nav Dropdown */
.nav-dropdown {
    margin-bottom: 2px;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
}

.nav-dropdown-toggle:hover {
    background: #f1f5f9;
    color: #6366f1;
}

.nav-dropdown-toggle i:first-child {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.nav-dropdown-toggle .nav-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s;
}

.nav-dropdown.open .nav-arrow {
    transform: rotate(90deg);
}

.nav-dropdown-menu {
    display: none;
    padding: 4px 0 4px 32px;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: #64748b;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-dropdown-menu a:hover {
    background: #f1f5f9;
    color: #6366f1;
}

.nav-dropdown-menu a.active {
    color: #6366f1;
    font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid #e2e8f0;
}

.sidebar-footer .nav-item {
    color: #ef4444;
}

.sidebar-footer .nav-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Dashboard Main Content */
.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    color: #6366f1;
    border-color: #6366f1;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dashboard-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.dashboard-card-icon.purple {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.dashboard-card-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.dashboard-card-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.dashboard-card-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.dashboard-card-label {
    font-size: 13px;
    color: #64748b;
}

/* Dashboard Content Box */
.dashboard-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dashboard-content-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-content-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-content-title i {
    color: #6366f1;
}

.dashboard-content-body {
    padding: 20px;
}

/* Override old styles when logged in */
section:not(.public-home):not(.register-page) {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

section:not(.public-home):not(.register-page) .grayBg {
    display: none;
}

section:not(.public-home):not(.register-page) .loggedAs {
    display: none;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .dashboard-sidebar.open {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-main {
        padding: 16px;
    }
}

/* ========== Modern Dashboard Content Styles ========== */

/* Override old box styles in dashboard */
.dashboard-content-body .box,
.dashboard-content-body .twoBox .box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 0 0 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dashboard-content-body .twoBox {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-content-body .twoBox .box {
    float: none;
    width: 100%;
    margin: 0;
}

.dashboard-content-body .box h1 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 20px;
    margin: 0;
    border-radius: 0;
    height: auto;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-content-body .box h1 i {
    font-size: 16px;
    margin-right: 0;
}

/* Lines / Info Rows */
.dashboard-content-body .lines {
    padding: 0;
}

.dashboard-content-body .lines > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    color: #475569;
    height: auto;
    line-height: 1.5;
}

.dashboard-content-body .lines > div:first-child {
    border-top: none;
}

.dashboard-content-body .lines > div.two {
    background: #f8fafc;
}

.dashboard-content-body .lines > div span {
    float: none;
    font-weight: 600;
    color: #0f172a;
}

.dashboard-content-body .lines.logs > div {
    background: #fff;
    border-color: #e2e8f0;
}

.dashboard-content-body .lines.logs > div.two {
    background: #f8fafc;
}

.dashboard-content-body .lines.logs > div:first-child {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
}

/* Breadcrumb */
.dashboard-content-body ul.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.dashboard-content-body ul.breadcrumb li {
    display: flex;
    align-items: center;
    float: none;
}

.dashboard-content-body ul.breadcrumb li + li:before {
    content: "/";
    padding: 0 8px;
    color: #94a3b8;
    font-weight: normal;
}

.dashboard-content-body ul.breadcrumb li a {
    color: #6366f1;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.dashboard-content-body ul.breadcrumb li a:hover {
    color: #4f46e5;
}

.dashboard-content-body ul.breadcrumb li a i {
    margin-right: 6px;
}

/* Character Selection */
.dashboard-content-body .mult {
    padding: 20px;
}

.dashboard-content-body .mult .selec {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 20px 0;
    flex-wrap: wrap;
}

.dashboard-content-body .mult .selec > * {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    float: none;
    padding: 0;
    position: relative;
}

.dashboard-content-body .mult .selec > div:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.dashboard-content-body .mult .selec > div.actived {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #fff;
}

.dashboard-content-body .mult .selec > div > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-content-body .mult .selec > div > div {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 9px;
    text-align: center;
    width: 100%;
}

.dashboard-content-body .mult .selec > span {
    background: #f1f5f9;
    border: 2px dashed #e2e8f0;
}

.dashboard-content-body .mult .infos {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    min-height: auto;
    width: 100%;
}

.dashboard-content-body .mult .lines {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.dashboard-content-body .mult .infos {
    display: none;
}

.dashboard-content-body .mult .infos.actived {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
}

/* Tables */
.dashboard-content-body table.default {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-collapse: collapse;
}

.dashboard-content-body table.default tr th {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
}

.dashboard-content-body table.default tr td {
    padding: 12px 16px;
    font-size: 13px;
    color: #475569;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.dashboard-content-body table.default tr.two td {
    background: #f8fafc;
}

.dashboard-content-body table.default tr:last-child td {
    border-bottom: none;
}

.dashboard-content-body table.default tr td.foco {
    font-weight: 600;
    color: #0f172a;
    background: rgba(99, 102, 241, 0.05);
}

/* Buttons */
.dashboard-content-body a.default,
.dashboard-content-body span.default,
.dashboard-content-body input.default {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: #fff !important;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.dashboard-content-body a.default:hover,
.dashboard-content-body span.default:hover,
.dashboard-content-body input.default:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.dashboard-content-body a.default.big,
.dashboard-content-body span.default.big,
.dashboard-content-body input.default.big {
    padding: 12px 28px;
    font-size: 15px;
}

/* Form Styles */
.dashboard-content-body .formpadrao {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    margin: 0 auto 16px;
}

.dashboard-content-body .formpadrao > div {
    background: transparent;
    border-radius: 8px;
}

.dashboard-content-body .formpadrao .desc {
    color: #475569;
    font-weight: 500;
    padding: 12px 16px;
}

.dashboard-content-body .formpadrao .camp input,
.dashboard-content-body .formpadrao .camp select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    background: #fff;
    color: #1e293b;
}

.dashboard-content-body .formpadrao .camp select option {
    background: #fff;
    color: #1e293b;
    padding: 10px;
    box-shadow: none;
    transition: all 0.2s;
}

.dashboard-content-body .formpadrao .camp input:focus,
.dashboard-content-body .formpadrao .camp select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #fff;
}

/* Service Box */
.dashboard-content-body .service {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.dashboard-content-body .service > .title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}

.dashboard-content-body .service > .title .costs {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
}

/* Messages */
.dashboard-content-body .rmsg {
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-content-body .rmsg.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Donate Box */
.dashboard-content-body table.donateBox {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.dashboard-content-body table.donateBox th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.dashboard-content-body table.donateBox td {
    border-color: #f1f5f9;
}

.dashboard-content-body table.donateBox select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #fff;
    color: #1e293b;
}

.dashboard-content-body table.donateBox select:hover {
    border-color: #6366f1;
    background: #fff;
}

.dashboard-content-body table.donateBox select option {
    background: #fff;
    color: #1e293b;
    padding: 10px;
}

/* Global select styles for dashboard */
.dashboard-content-body select,
.main-content select {
    background: #fff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 36px;
}

.dashboard-content-body select:focus,
.main-content select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dashboard-content-body select option,
.main-content select option {
    background: #fff !important;
    color: #1e293b !important;
    padding: 12px;
}

/* Paginate */
.dashboard-content-body .paginate a {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569 !important;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 500;
    box-shadow: none;
}

.dashboard-content-body .paginate a:hover {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}

.dashboard-content-body .paginate a.atual {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}

/* Responsive for dashboard content */
@media (max-width: 1024px) {
    .dashboard-content-body .twoBox {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content-body .mult .infos.actived {
        grid-template-columns: 1fr;
    }
}

/* ========== Content Text Styles (Settings & Updates) ========== */
.content-text {
    line-height: 1.8;
    color: #1e293b;
    font-size: 15px;
}

.content-text h1,
.content-text h2,
.content-text h3 {
    color: #0f172a;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.content-text h1 {
    font-size: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.content-text h2 {
    font-size: 20px;
}

.content-text h3 {
    font-size: 18px;
}

.content-text ul,
.content-text ol {
    margin: 12px 0;
    padding-left: 24px;
}

.content-text li {
    margin: 6px 0;
}

.content-text strong {
    color: #6366f1;
    font-weight: 600;
}

.content-text p {
    margin: 12px 0;
}

.content-text code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #6366f1;
}


