
:root {
    --primary-color: #00a8ff;
    --origin-color: #9b59b6;
    --new-badge-color: #ff4757;
    
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --glass-bg: rgba(20, 20, 30, 0.7); 
    --glass-card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    
    --text-main: #e0e0e0;
    --text-muted: #aaa;
}

body {
    background-image: var(--bg-gradient);
    background-attachment: fixed; 
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
}

header {
    background: transparent; 
    padding: 0;
    position: sticky; 
    top: 0;
    z-index: 1001;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-container button {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-container button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
}

#toggle-origin-mode {
    --gold-color: #FFD700; 
    
    border-color: var(--gold-color) !important;
    color: var(--gold-color) !important;
    font-weight: bold;
    
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
    
    display: flex;
    align-items: center;
    gap: 8px; 
    padding: 8px 15px;
    border-radius: 6px; 
    transition: all 0.3s ease;
}

#toggle-origin-mode::before {
    content: '🐉'; 
    font-size: 1.4em; 
    line-height: 1;
    
    
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
}

#toggle-origin-mode.active {
    background: linear-gradient(135deg, var(--origin-color), #4a235a) !important;
    color: var(--gold-color) !important;
    border-color: var(--gold-color) !important;
    
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), inset 0 0 10px var(--origin-color) !important;
}

#toggle-origin-mode:hover {
    background: rgba(255, 215, 0, 0.1); 
    border-color: var(--gold-color);
    transform: translateY(-2px); 
}

.menu {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 300px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content {
    padding: 20px 40px;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
    .menu {
        transform: translateX(0) !important; 
    }
    .content {
        margin-left: 300px !important;
    }

    body.menu-hidden .menu {
        transform: translateX(-300px) !important;
    }
    body.menu-hidden .content {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .menu {
        width: 85%; 
        max-width: 300px;
        transform: translateX(-100%) !important; 
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }
    
    .content {
        margin-left: 0 !important;
        padding: 15px;
    }

    .menu.show {
        transform: translateX(0) !important;
    }
}

@media (max-width: 768px) {
    .menu {
        width: 100%;
        transform: translateX(-100%);
    }
    .menu.show {
        transform: translateX(0);
    }
}

#character-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    color: var(--text-main);
    text-align: left;
    transition: background 0.2s;
    position: relative; 
}


#character-menu button:hover {
    background: rgba(255,255,255,0.1);
}

#character-menu button img.avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
}

.character-button img.avatar {
    width: 100%;
    height: 100%;
    border-radius: 0; 
    border: none;    
}

.avatar-wrapper {
    position: relative; 
    width: 40px;        
    height: 40px;
    flex-shrink: 0;   
    border-radius: 8px; 
    overflow: hidden;   
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-wrapper img.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; 
    border: none;
    margin: 0; 
}

.new-badge {
    position: absolute;
    top: 3px;
    left: -22px;
    transform: rotate(-45deg);
    width: 60px;
    background-color: #d9534f;
    color: white;
    font-size: 0.44rem;
    font-weight: bold;
    text-align: center;
    line-height: 9px;
    padding: 1px 0;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
    border-radius: 0;
}

.thumbnail, .skill-gif {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

#filter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 6px; 
    padding: 10px;
    margin-top: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#filter-tabs button {
    width: 100%;
    min-height: 50px; 
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 2px; 
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

#filter-tabs button img {
    width: 40px;  
    height: 40px;
    object-fit: contain;
    display: block;
    margin: 0; 
}

#class-filter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 6px; 
    padding: 10px;
}

#class-filter-tabs button {
    width: 90%;
    padding: 0; 
    border: none;
    background: transparent;
    border-radius: 6px; 
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    overflow: hidden;
    aspect-ratio: 2.2 / 1; 
    
    display: flex;
    align-items: center;
    justify-content: center;
}

#class-filter-tabs button img {
    width: 100%;
    height: 100%;
    object-fit: fill; 
    display: block;
}

#filter-tabs button:hover, #class-filter-tabs button:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(255,255,255,0.15);
}

#filter-tabs button.active {
    opacity: 1;
    border-color: var(--primary-color);
    background: rgba(0, 168, 255, 0.2);
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.4);
}

#class-filter-tabs button.active {
    opacity: 1;
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.4);
    transform: scale(1.05);
}

body.origin-mode .menu button:not(.is-origin) {
    display: none;
}

body.origin-mode .menu button.is-origin {
    border-left: 3px solid var(--origin-color);
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.2), transparent);
}

.origin-skill-view {
    animation: fadeIn 0.5s ease;
    max-width: 800px; 
    margin: 0 auto;
}

.origin-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--origin-color);
}

.origin-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--origin-color);
    box-shadow: 0 0 20px var(--origin-color);
    margin-bottom: 15px;
}

.origin-header h2 {
    color: var(--origin-color);
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
}

.origin-content-body h3 { 
    color: #fff;
    background: linear-gradient(90deg, var(--origin-color), transparent);
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 30px;
}

.origin-content-body strong {
    color: #f1c40f; 
}

.origin-content-body ul {
    background: var(--glass-card-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 20px 40px;
    margin: 15px 0 30px 0;
    list-style-type: circle;
}

.origin-content-body li {
    margin-bottom: 10px;
    line-height: 1.6;
}

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

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4);
}


blockquote {
    margin: 20px 0; 
    
    padding: 15px 20px; 
    background: rgba(0, 0, 0, 0.2); 
    border-left: 4px solid var(--primary-color); 
    border-radius: 0 8px 8px 0; 
   
    color: #ddd; 
    font-style: italic; 
    font-size: 0.95em;
    line-height: 1.6; 
    
    text-align: justify;
    
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

blockquote p {
    margin: 0;
    padding: 0;
}

.origin-skill-view blockquote {
    border-left-color: var(--origin-color);
    background: rgba(155, 89, 182, 0.1);
    color: #e0c0e0; 
}

@keyframes rainbow-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.vip-text {
    background: linear-gradient(
        90deg, 
        #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000
    );
    background-size: 200% auto; 
    
    -webkit-background-clip: text;
    background-clip: text;
    
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    animation: rainbow-move 3s linear infinite;
    
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.vip-icon {
    margin-right: 5px;
    font-size: 1.1em;
}