/**
 * Metin2 Fixes Widget CSS
 * Design tematic Metin2 cu opțiuni complete de customizare
 */

/* Base Styles */
.metin2-fixes-container {
    font-family: 'Cinzel', 'Times New Roman', serif;
    position: relative;
    overflow: hidden;
}

.metin2-fixes-container * {
    box-sizing: border-box;
}

/* Theme Styles */

/* Metin2 Classic Theme */
.metin2-fixes-container.theme-metin2_classic {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 3px solid #d4af37;
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.metin2-fixes-container.theme-metin2_classic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dragon-pattern" x="0" y="0" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M25,5 Q35,15 25,25 Q15,15 25,5" fill="none" stroke="rgba(212,175,55,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23dragon-pattern)"/></svg>') repeat;
    pointer-events: none;
    z-index: 0;
}

/* Metin2 Dark Theme */
.metin2-fixes-container.theme-metin2_dark {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #2d2d2d 100%);
    border: 2px solid #8b0000;
    border-radius: 10px;
    box-shadow: 
        0 0 40px rgba(139, 0, 0, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Metin2 Gold Theme */
.metin2-fixes-container.theme-metin2_gold {
    background: linear-gradient(135deg, #2c1810 0%, #4a2c17 50%, #6b3e1a 100%);
    border: 3px solid #ffd700;
    border-radius: 20px;
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.5),
        inset 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Dragon Theme */
.metin2-fixes-container.theme-metin2_dragon {
    background: linear-gradient(135deg, #4a0e4e 0%, #81003c 50%, #a91b60 100%);
    border: 3px solid #ff6b9d;
    border-radius: 25px;
    box-shadow: 
        0 0 60px rgba(255, 107, 157, 0.4),
        inset 0 0 50px rgba(0, 0, 0, 0.7);
}

/* Header Styles */
.metin2-fixes-header {
    text-align: center;
    padding: 30px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px 15px 0 0;
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
}

.metin2-fixes-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(212, 175, 55, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.theme-metin2_classic .metin2-fixes-title {
    color: #d4af37;
    background: linear-gradient(45deg, #d4af37, #ffd700, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-metin2_dark .metin2-fixes-title {
    color: #ff4444;
}

.theme-metin2_gold .metin2-fixes-title {
    color: #ffd700;
}

.theme-metin2_dragon .metin2-fixes-title {
    color: #ff6b9d;
}

.metin2-fixes-subtitle {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.9;
    font-style: italic;
}

.theme-metin2_classic .metin2-fixes-subtitle {
    color: #c0c0c0;
}

.theme-metin2_dark .metin2-fixes-subtitle {
    color: #cccccc;
}

.theme-metin2_gold .metin2-fixes-subtitle {
    color: #e6d7b3;
}

.theme-metin2_dragon .metin2-fixes-subtitle {
    color: #f0c0d0;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 25px;
}

.search-box {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 25px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-box:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    background: rgba(0, 0, 0, 0.6);
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #d4af37;
    font-size: 18px;
    pointer-events: none;
}

/* Statistics */
.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-item {
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.theme-metin2_classic .stat-item {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(255, 215, 0, 0.1));
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.3);
}

.theme-metin2_dark .stat-item {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(139, 0, 0, 0.1));
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.3);
}

.theme-metin2_gold .stat-item {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.1));
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.4);
}

.theme-metin2_dragon .stat-item {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(169, 27, 96, 0.1));
    color: #ff6b9d;
    border-color: rgba(255, 107, 157, 0.3);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Content Wrapper */
.fixes-content-wrapper {
    padding: 30px;
    position: relative;
    z-index: 1;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
    color: #d4af37;
}

.loading-indicator i {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Category Sections */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 3px solid;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.theme-metin2_classic .category-title {
    color: #d4af37;
    border-bottom-color: #d4af37;
}

.theme-metin2_dark .category-title {
    color: #ff4444;
    border-bottom-color: #ff4444;
}

.theme-metin2_gold .category-title {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

.theme-metin2_dragon .category-title {
    color: #ff6b9d;
    border-bottom-color: #ff6b9d;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.category-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px currentColor);
}

/* Fix Items */
.fix-item {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-metin2_classic .fix-item {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.6));
    border-color: rgba(212, 175, 55, 0.2);
}

.theme-metin2_dark .fix-item {
    background: linear-gradient(135deg, rgba(12, 12, 12, 0.9), rgba(26, 26, 26, 0.7));
    border-color: rgba(255, 68, 68, 0.2);
}

.theme-metin2_gold .fix-item {
    background: linear-gradient(135deg, rgba(44, 24, 16, 0.8), rgba(74, 44, 23, 0.6));
    border-color: rgba(255, 215, 0, 0.2);
}

.theme-metin2_dragon .fix-item {
    background: linear-gradient(135deg, rgba(74, 14, 78, 0.8), rgba(129, 0, 60, 0.6));
    border-color: rgba(255, 107, 157, 0.2);
}

.fix-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.theme-metin2_classic .fix-item:hover {
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.theme-metin2_dark .fix-item:hover {
    border-color: #ff4444;
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.3);
}

.theme-metin2_gold .fix-item:hover {
    border-color: #ffd700;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.theme-metin2_dragon .fix-item:hover {
    border-color: #ff6b9d;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
}

/* Fix Header */
.fix-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.fix-header:hover {
    background: rgba(0, 0, 0, 0.4);
}

.fix-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.fix-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-metin2_classic .fix-icon {
    color: #d4af37;
}

.theme-metin2_dark .fix-icon {
    color: #ff4444;
}

.theme-metin2_gold .fix-icon {
    color: #ffd700;
}

.theme-metin2_dragon .fix-icon {
    color: #ff6b9d;
}

.toggle-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.fix-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* Fix Content */
.fix-content {
    display: none;
    background: rgba(0, 0, 0, 0.6);
    position: relative;
}

.fix-item.active .fix-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Code Container */
.code-container {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-metin2_classic .copy-button {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #000;
}

.theme-metin2_dark .copy-button {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: #fff;
}

.theme-metin2_gold .copy-button {
    background: linear-gradient(135deg, #ffd700, #e6c200);
    color: #000;
}

.theme-metin2_dragon .copy-button {
    background: linear-gradient(135deg, #ff6b9d, #e55a8a);
    color: #fff;
}

.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.copy-button.copied {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
    color: #fff !important;
}

/* Code Block */
.fix-content pre {
    margin: 0;
    padding: 60px 25px 25px 25px;
    background: #1e1e1e !important;
    color: #e6e6e6;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    border-radius: 0;
}

.fix-content code {
    font-family: inherit;
    background: none !important;
    padding: 0 !important;
}

/* Syntax Highlighting */
.token.comment { color: #6a9955; }
.token.keyword { color: #569cd6; }
.token.string { color: #ce9178; }
.token.number { color: #b5cea8; }
.token.operator { color: #d4d4d4; }
.token.punctuation { color: #d4d4d4; }
.token.function { color: #dcdcaa; }
.token.class-name { color: #4ec9b0; }
.token.preprocessor { color: #c586c0; }

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Highlight */
.highlight {
    background-color: rgba(255, 255, 0, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    color: #000;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .metin2-fixes-container {
        margin: 10px;
    }
    
    .metin2-fixes-header {
        padding: 20px 15px;
    }
    
    .metin2-fixes-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .metin2-fixes-subtitle {
        font-size: 1rem;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .fixes-content-wrapper {
        padding: 20px 15px;
    }
    
    .category-title {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .fix-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .fix-title {
        justify-content: center;
    }
    
    .fix-content pre {
        padding: 50px 15px 15px 15px;
        font-size: 12px;
    }
    
    .copy-button {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .metin2-fixes-title {
        font-size: 1.5rem;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        width: 200px;
        justify-content: center;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.bounce-in {
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Custom Scrollbar */
.fix-content pre::-webkit-scrollbar {
    height: 8px;
}

.fix-content pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.fix-content pre::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.6);
    border-radius: 4px;
}

.fix-content pre::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.8);
}