/* --- RESET & VARIABLES --- */
* { box-sizing: border-box; font-family: 'Space Grotesk', sans-serif; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a35; border-radius: 4px; }

body { 
    margin: 0; background-color: #050508; color: #fff; height: 100vh; display: flex; flex-direction: column; position: relative;
}

body::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%2314F195' stroke-width='1.5' fill='none' stroke-opacity='0.07'%3E%3Cpath d='M9 12a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M15 12a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 35px 35px; animation: breatheGlow 4s infinite alternate ease-in-out;
}
@keyframes breatheGlow { 0% { opacity: 0.4; filter: blur(0.5px); } 100% { opacity: 1; filter: blur(0px); } }

/* --- HEADER --- */
.header { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: rgba(5, 5, 8, 0.85); border-bottom: 1px solid #1a1a24; backdrop-filter: blur(12px); z-index: 10; }
.logo-container { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 22px; font-weight: 700; background: linear-gradient(90deg, #14F195, #9945FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-svg { filter: drop-shadow(0px 0px 8px rgba(20,241,149,0.4)); transform-style: preserve-3d; animation: organicSpin 5s infinite; }
@keyframes organicSpin { 0%, 75% { transform: perspective(500px) rotateY(0deg) rotateX(0deg) scale(1); } 85% { transform: perspective(500px) rotateY(180deg) rotateX(15deg) scale(1.1); filter: drop-shadow(0px 0px 15px rgba(20,241,149,0.9)); } 100% { transform: perspective(500px) rotateY(360deg) rotateX(0deg) scale(1); } }

.header-right { display: flex; align-items: center; gap: 15px; }
.btn-connect { background: #14F195; color: #000; border: none; padding: 10px 20px; font-weight: 700; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 14px; }
.btn-connect:hover { background: #0ed180; box-shadow: 0 0 12px rgba(20,241,149,0.3); }

.sol-badge { display: none; align-items: center; background: #0d0d12; border: 1px solid #2a2a35; border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sol-badge svg.sol-logo { width: 14px; height: 14px; margin-right: 8px; }

.menu-container { position: relative; display: none; }
.burger-btn { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; padding: 0 5px; }
.dropdown { display: none; position: absolute; right: 0; top: 40px; background: #0d0d12; border: 1px solid #2a2a35; border-radius: 8px; width: 160px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.8); }
.dropdown a { display: block; padding: 12px 15px; color: #aaa; text-decoration: none; font-size: 14px; border-bottom: 1px solid #1a1a24; transition: 0.2s; }
.dropdown a:hover { background: #1a1a24; color: #fff; padding-left: 20px; }

/* --- 3-COLUMN LAYOUT --- */
.main-container { display: flex; flex-grow: 1; overflow: hidden; }

/* Sidebar Gauche (Tiers) */
.sidebar { width: 260px; background: rgba(8, 8, 12, 0.8); border-right: 1px solid #1a1a24; display: flex; flex-direction: column; padding: 15px 0; }
.room-tab { padding: 16px 24px; cursor: pointer; color: #777; font-weight: 600; border-left: 3px solid transparent; transition: 0.2s; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.room-tab:hover { background: rgba(255,255,255,0.02); color: #ccc; }
.room-tab.active { background: linear-gradient(90deg, rgba(153,69,255,0.05) 0%, transparent 100%); color: #9945FF; border-left: 3px solid #9945FF; }
.tier-price { font-size: 11px; background: #1a1a24; padding: 2px 6px; border-radius: 4px; color: #aaa; }

/* Zone Centrale (Tchat Main) */
.chat-area { flex-grow: 1; display: flex; flex-direction: column; position: relative; background: rgba(0,0,0,0.2); }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }

/* Sidebar Droite (CA Drop Permanent) */
.ca-sidebar { width: 350px; background: rgba(8, 8, 12, 0.9); border-left: 1px solid #1a1a24; display: flex; flex-direction: column; }
.ca-header { padding: 15px; border-bottom: 1px solid #1a1a24; font-weight: bold; color: #14F195; display: flex; align-items: center; gap: 10px; }
.ca-header svg { width: 18px; height: 18px; }

/* Composants Tchat Communs */
.chat-input-area { display: flex; padding: 15px; border-top: 1px solid #1a1a24; background: rgba(5,5,8,0.9); }
.chat-input { flex-grow: 1; padding: 12px; background: #0d0d12; border: 1px solid #2a2a35; color: white; border-radius: 8px; margin-right: 10px; font-size: 13px; }
.chat-input:focus { outline: none; border-color: #14F195; }

.message { padding: 4px 0; }
.message-header { font-size: 11px; color: #555; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; font-family: 'Courier New', monospace; flex-wrap: wrap; }
.message-username { font-weight: bold; cursor: pointer; font-family: 'Space Grotesk', sans-serif; font-size: 13px; }
.message-body { color: #ddd; font-size: 13px; line-height: 1.4; padding-left: 8px; border-left: 2px solid #222; margin-top: 4px; word-break: break-all; }

/* DexScreener Card */
.dex-card { background: #0d0d12; border: 1px solid #2a2a35; border-radius: 8px; padding: 12px; margin-top: 8px; font-family: 'Space Grotesk', sans-serif; display: flex; flex-direction: column; gap: 5px; }
.dex-title { font-weight: bold; color: #14F195; font-size: 14px; display: flex; justify-content: space-between; }
.dex-data { display: flex; gap: 15px; font-size: 12px; color: #aaa; }
.dex-data span { color: #fff; font-weight: 600; }
.dex-link { color: #9945FF; text-decoration: none; font-size: 11px; margin-top: 5px; display: inline-block; }

.locked-overlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; backdrop-filter: blur(12px); background: rgba(5,5,8,0.8); flex-direction: column; align-items: center; justify-content: center; z-index: 5; }
.locked-overlay h2 { color: #fff; margin-bottom: 10px; font-size: 28px; }
.btn-unlock { background: linear-gradient(90deg, #9945FF, #7a36cc); color: white; border: none; padding: 12px 24px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: 0.2s; }

#wallet-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); align-items: center; justify-content: center; z-index: 50; }
.modal-content { background: #0d0d12; padding: 30px; border-radius: 16px; width: 340px; text-align: center; border: 1px solid #2a2a35; }
.wallet-btn { width: 100%; margin: 8px 0; padding: 14px; font-size: 15px; border: none; border-radius: 8px; cursor: pointer; color: white; font-weight: 600; }
