/* ═══════════════════════════════════════════════════════════
   CADIA CLIENT - MENU STYLE (HTML/CSS VERSION)
   Style moderne avec effets hover, animations, et glassmorphism
   ═══════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: rgba(16, 16, 24, 0.85);
    --accent-color: #4A9EFF;
    --accent-hover: #5AAFFF;
    --text-color: #FFFFFF;
    --text-disabled: #808080;
    --button-bg: #1E1E2E;
    --button-hover: #252535;
    --setting-bg: #0F0F17;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: transparent;
    color: var(--text-color);
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background avec effet blur */
.background-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(74, 158, 255, 0.1) 0%, 
        rgba(58, 126, 216, 0.05) 50%,
        rgba(42, 94, 184, 0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
}

/* Container principal */
.menu-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Header */
.menu-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.logo-container {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.logo {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(74, 158, 255, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.title-container {
    flex: 1;
}

.menu-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #4A9EFF 0%, #5AAFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.version {
    font-size: 12px;
    color: var(--text-disabled);
    font-weight: 500;
}

/* Catégories */
.categories-container {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    min-width: min-content;
}

.category-btn {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-disabled);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.category-btn:hover {
    background: var(--button-hover);
    color: var(--text-color);
    transform: translateY(-1px);
}

.category-btn.active {
    color: var(--text-color);
    background: var(--button-hover);
}

.category-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Modules */
.modules-container {
    height: calc(100% - 130px);
    overflow: hidden;
}

.modules-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 158, 255, 0.3) transparent;
}

.modules-scroll::-webkit-scrollbar {
    width: 6px;
}

.modules-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modules-scroll::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 3px;
}

.modules-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.5);
}

/* Module Card */
.module-card {
    background: var(--button-bg);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.module-card:hover {
    background: var(--button-hover);
    border-color: rgba(74, 158, 255, 0.2);
    transform: translateX(2px);
}

.module-card.enabled {
    border-color: rgba(74, 158, 255, 0.5);
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.15);
}

.module-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    position: relative;
}

.module-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.module-card.enabled .module-name {
    color: var(--accent-color);
}

.module-keybind {
    font-size: 11px;
    color: var(--text-disabled);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-weight: 500;
}

.module-expand {
    font-size: 12px;
    color: var(--text-disabled);
    transition: var(--transition);
}

.module-card.expanded .module-expand {
    transform: rotate(90deg);
}

/* Settings */
.module-settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--setting-bg);
}

.module-card.expanded .module-settings {
    max-height: 1000px;
}

.setting-item {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.setting-name {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
}

/* Toggle Switch */
.toggle-switch {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--accent-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    left: 22px;
}

/* Slider */
.slider-container {
    flex: 1;
    max-width: 200px;
    margin-left: 15px;
}

.slider {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.4);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.6);
}

.slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.4);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.6);
}

.slider-value {
    font-size: 11px;
    color: var(--accent-color);
    margin-left: 10px;
    min-width: 40px;
    text-align: right;
    font-weight: 600;
}

/* Dropdown */
.dropdown-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.dropdown-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.dropdown-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

/* Button */
.setting-button {
    background: var(--accent-color);
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.setting-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.setting-button:active {
    transform: translateY(0);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.module-card.enabled .module-header {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 600px) {
    .menu-container {
        width: 90%;
        height: 80%;
    }
}
