/* PromFiles.me — Homepage CSS
   Dynamic values (hero bg, gif position, viewer height) are set as CSS variables
   via a small inline <style> block in index.php and referenced here.
   Cached by Caddy for 30 days (immutable). */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-deep: #010409;
    --bg-base: #0d1117;
    --bg-card: #161b22;
    --bg-hover: #1c2333;
    --border: #21262d;
    --border-light: #30363d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #e74c3c;
    --accent-hover: #ff5544;
    --accent-glow: rgba(231, 76, 60, 0.25);
    --gold: #c9a86c;
    --gold-glow: rgba(201, 168, 108, 0.2);
    --blue: #58a6ff;
    --green: #3fb950;
    /* Dynamic defaults — overridden by inline <style> in index.php */
    --hero-bg-url: url('/images/UT99x3.jpg');
    --hero-gif-top: 44.0%;
    --hero-gif-left: 49.7%;
    --hero-gif-max-height: 302px;
    --viewer-iframe-height: 520px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-base);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.nav { position:fixed; top:0; left:0; right:0; z-index:100; background:rgba(1,4,9,0.85); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-bottom:1px solid var(--border); padding:0 24px; height:56px; display:flex; align-items:center; justify-content:space-between; }
.nav-brand { display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--text); font-weight:700; font-size:18px; letter-spacing:-0.3px; }
.nav-brand img { height:60px; width:auto; }
.nav-links { display:flex; align-items:center; gap:6px; }
.nav-links a { color:var(--text-muted); text-decoration:none; padding:8px 14px; border-radius:6px; font-size:14px; font-weight:500; transition:all 0.2s; }
.nav-links a:hover { color:var(--text); background:var(--bg-hover); }
.nav-center { position:absolute; left:50%; transform:translateX(-50%); text-align:center; }
.nav-center a { color:var(--text-muted); text-decoration:none; padding:8px 14px; border-radius:6px; font-size:14px; font-weight:500; transition:all 0.2s; }
.nav-center a:hover { color:var(--text); background:var(--bg-hover); }
.nav-tagline { display:block; font-size:11px; color:var(--text-muted); letter-spacing:1px; margin-top:-2px; }
.nav-links .btn-login { background:var(--bg-card); border:1px solid var(--border-light); border-radius:10px; color:var(--text-muted); font-weight:500; padding:8px 16px; }
.nav-links .btn-login:hover { color:var(--text); border-color:var(--accent); background:var(--bg-hover); }

.hero { position:relative; margin-top:56px; min-height:90vh; padding:160px 24px 40px; text-align:center; overflow:visible; background:var(--bg-deep); display:flex; align-items:center; justify-content:center; }
.hero::before { content:''; position:absolute; inset:0; background:var(--hero-bg-url) center/cover no-repeat; }
.hero::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg, rgba(1,4,9,0.3) 0%, rgba(1,4,9,0.4) 70%, var(--bg-base) 100%); }
.hero-content { position:relative; z-index:1; max-width:700px; margin:0 auto; display:flex; flex-direction:column; align-items:center; justify-content:space-between; height:100%; }
.hero-logo { max-width:360px; width:80%; margin-bottom:16px; filter:drop-shadow(0 4px 20px rgba(0,0,0,0.5)); }
.hero-tagline { font-size:18px; color:var(--text-muted); margin-bottom:0; font-weight:400; }
.hero-ut { position:absolute; top:var(--hero-gif-top); left:var(--hero-gif-left); transform:translate(-50%,-50%); z-index:1; }
.hero-ut img { height:28vmin; max-height:var(--hero-gif-max-height); filter:drop-shadow(0 0 15px var(--gold-glow)); }

.container { max-width:1200px; margin:0 auto; padding:0 24px; }
.servers-section { padding:40px 0 20px; }
.section-title { font-size:15px; font-weight:600; text-transform:uppercase; letter-spacing:1.5px; color:var(--text); margin-bottom:16px; display:flex; align-items:center; gap:10px; }
.section-title::after { content:''; flex:1; height:1px; background:var(--border); }
.server-grid { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:10px; }
.server-btn { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:14px 16px; text-align:center; cursor:pointer; transition:all 0.25s; color:var(--text); font-family:inherit; font-size:14px; font-weight:500; display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; overflow:hidden; }
.server-btn:hover { border-color:var(--accent); background:var(--bg-hover); transform:translateY(-2px); box-shadow:0 4px 20px var(--accent-glow); }
.server-btn:active { transform:translateY(0); }
.server-btn .icon { font-size:24px; line-height:1; }
.server-btn .label { font-size:clamp(9px,1.8vw,14px); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%; text-align:center; }
.server-btn.active { border-color:var(--accent); background:rgba(231,76,60,0.08); }

.viewer-section { padding:20px 0 40px; }
.viewer-card { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.viewer-toolbar { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; background:var(--bg-deep); border-bottom:1px solid var(--border); font-size:14px; color:var(--text-muted); }
.viewer-toolbar .dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; }
.viewer-toolbar .dot-red { background:#ff5f57; }
.viewer-toolbar .dot-yellow { background:#febc2e; }
.viewer-toolbar .dot-green { background:#28c840; }
.viewer-toolbar .viewer-title { font-family:'Inter',sans-serif; font-size:15px; font-weight:600; text-transform:uppercase; letter-spacing:1.5px; color:var(--text); }
.viewer-iframe { width:100%; height:var(--viewer-iframe-height); border:0; margin:0; padding:0; display:block; background:#000; overflow:hidden; }
.viewer-resize { height:8px; background:var(--border); cursor:ns-resize; display:flex; align-items:center; justify-content:center; transition:background 0.2s; }
.viewer-resize:hover { background:var(--border-light); }
.viewer-resize::after { content:''; width:40px; height:3px; border-radius:2px; background:var(--text-muted); opacity:0.4; }

.folders-section { padding:0 0 20px; }

.chat-section { padding:0 0 40px; }
.chat-card { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; overflow:hidden; position:relative; }
.chat-drop-overlay { display:none; position:absolute; inset:0; background:rgba(88,166,255,0.13); border:2px dashed var(--blue); border-radius:10px; z-index:10; align-items:center; justify-content:center; font-size:18px; color:var(--blue); font-weight:600; pointer-events:none; gap:10px; }
.chat-card.drag-over .chat-drop-overlay { display:flex; }
.chat-emoji-btn { background:var(--bg-base); border:1px solid var(--border); border-radius:6px; padding:8px 10px; color:var(--text-muted); cursor:pointer; font-size:16px; transition:all 0.2s; flex-shrink:0; }
.chat-emoji-btn:hover { border-color:var(--gold); color:var(--gold); }
.emoji-picker { display:none; position:fixed; background:var(--bg-card); border:1px solid var(--border-light); border-radius:10px; padding:8px; width:264px; max-height:184px; overflow-y:auto; z-index:500; flex-wrap:wrap; gap:2px; box-shadow:0 -4px 24px rgba(0,0,0,0.6); }
.emoji-picker.open { display:flex; }
.emoji-picker span { font-size:22px; cursor:pointer; padding:4px 5px; border-radius:6px; transition:background 0.15s; line-height:1; user-select:none; }
.emoji-picker span:hover { background:var(--bg-hover); }
.chat-toolbar { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; background:var(--bg-deep); border-bottom:1px solid var(--border); font-size:14px; color:var(--text-muted); }
.chat-toolbar .chat-title { font-family:'Inter',sans-serif; font-size:15px; font-weight:600; letter-spacing:1.5px; color:var(--text); }
.chat-toolbar .chat-online { font-size:12px; color:var(--green); }
.chat-messages { height:300px; overflow-y:auto; padding:12px 16px; display:flex; flex-direction:column; gap:6px; scroll-behavior:smooth; }
.chat-messages::-webkit-scrollbar { width:6px; }
.chat-messages::-webkit-scrollbar-track { background:var(--bg-deep); }
.chat-messages::-webkit-scrollbar-thumb { background:var(--border-light); border-radius:3px; }
.chat-msg { font-size:13px; line-height:1.5; padding:4px 0; }
.chat-msg .chat-time { color:var(--text-muted); font-size:11px; font-family:'JetBrains Mono',monospace; margin-right:6px; }
.chat-msg .chat-name { color:var(--accent); font-weight:600; margin-right:6px; }
.chat-msg .chat-text { color:var(--text); }
.chat-empty { color:var(--text-muted); font-size:13px; text-align:center; padding:40px 0; }
.chat-input-bar { display:flex; flex-wrap:wrap; gap:8px; padding:10px 16px; border-top:1px solid var(--border); background:var(--bg-deep); }
.chat-input-bar input { flex:1; background:var(--bg-base); border:1px solid var(--border); border-radius:6px; padding:0 12px; height:36px; color:var(--text); font-family:inherit; font-size:13px; outline:none; transition:border-color 0.2s; }
.chat-input-bar input:focus { border-color:var(--accent); }
.chat-input-bar input::placeholder { color:var(--text-muted); }
.chat-input-bar input.chat-name-input { flex:0 0 100px; max-width:100px; }
.chat-input-bar #chatText { flex:1 1 200px; }
.chat-img-btn, .chat-emoji-btn, .chat-pm-btn { flex-shrink:0; }
.chat-input-bar #chatSend { flex:1; min-width:60px; }
.chat-input-bar button { background:var(--accent); border:none; border-radius:6px; padding:0 10px; height:36px; color:#fff; font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:background 0.2s; white-space:nowrap; flex-shrink:0; }
.chat-input-bar button:hover { background:var(--accent-hover); }
.chat-img-btn { background:var(--bg-base); border:1px solid var(--border); border-radius:6px; padding:8px 10px; color:var(--text-muted); cursor:pointer; font-size:16px; transition:all 0.2s; flex-shrink:0; }
.chat-img-btn:hover { border-color:var(--accent); color:var(--text); }
.chat-msg img { max-width:200px; max-height:150px; border-radius:6px; margin-top:4px; display:block; cursor:pointer; transition:opacity 0.2s; }
.chat-msg img:hover { opacity:0.85; }
.chat-preview { display:none; align-items:center; gap:8px; padding:6px 16px; border-top:1px solid var(--border); background:var(--bg-deep); font-size:12px; color:var(--text-muted); }
.chat-preview img { height:40px; border-radius:4px; }
.chat-preview .chat-preview-remove { color:var(--accent); cursor:pointer; font-weight:600; }
.chat-pm-btn { background:var(--bg-base); border:1px solid var(--border); border-radius:6px; padding:8px 10px; color:var(--text-muted); cursor:pointer; font-size:16px; transition:all 0.2s; flex-shrink:0; }
.chat-pm-btn:hover { border-color:var(--gold); color:var(--gold); }
.chat-pm-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:200; align-items:center; justify-content:center; }
.chat-pm-overlay.active { display:flex; }
.chat-pm-box { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; width:90%; max-width:420px; overflow:hidden; }
.chat-pm-header { padding:12px 16px; background:var(--bg-deep); border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.chat-pm-header span { font-size:14px; font-weight:600; color:var(--gold); }
.chat-pm-close { background:none; border:none; color:var(--text-muted); font-size:18px; cursor:pointer; }
.chat-pm-body { padding:16px; display:flex; flex-direction:column; gap:10px; }
.chat-pm-body input, .chat-pm-body textarea { background:var(--bg-base); border:1px solid var(--border); border-radius:6px; padding:8px 12px; color:var(--text); font-family:inherit; font-size:13px; outline:none; }
.chat-pm-body input:focus, .chat-pm-body textarea:focus { border-color:var(--gold); }
.chat-pm-body textarea { resize:vertical; min-height:80px; }
.chat-pm-body button { background:var(--gold); border:none; border-radius:6px; padding:10px; color:#000; font-weight:600; font-size:13px; cursor:pointer; }
.chat-pm-body button:hover { opacity:0.9; }
.chat-pm-sent { color:var(--green); font-size:13px; text-align:center; display:none; padding:8px; }

.folder-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; }
.folder-card { display:flex; align-items:center; gap:12px; padding:14px 16px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; text-decoration:none; color:var(--text); font-weight:500; font-size:14px; transition:all 0.25s; }
.folder-card:hover { border-color:var(--accent); background:var(--bg-hover); transform:translateY(-2px); box-shadow:0 4px 20px var(--accent-glow); color:white; }
.folder-card .folder-icon { font-size:22px; flex-shrink:0; }

.footer { border-top:1px solid var(--border); padding:40px 24px 32px; text-align:center; }
.footer-badge { margin-bottom:20px; }
.footer-badge img { height:88px; filter:drop-shadow(0 0 20px var(--gold-glow)); transition:filter 0.3s; }
.footer-badge img:hover { filter:drop-shadow(0 0 30px rgba(201,168,108,0.5)); }
.footer-badge p { margin-top:8px; font-size:11px; color:var(--text-muted); font-family:'JetBrains Mono',monospace; letter-spacing:2px; }
.social-links { display:flex; justify-content:center; gap:14px; margin-bottom:16px; }
.social-links a { display:flex; align-items:center; justify-content:center; width:44px; height:44px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; transition:all 0.25s; }
.social-links a:hover { border-color:var(--blue); transform:translateY(-2px); box-shadow:0 4px 15px rgba(88,166,255,0.2); }
.social-links a img { width:20px; height:20px; }
.footer-text { font-size:13px; color:var(--text-muted); }
.footer-text a { color:var(--text-muted); text-decoration:none; }
.footer-text a:hover { color:var(--text); }

@media (max-width:900px) { .hero { padding:60px 24px 40px; } .hero-ut img { height:200px; } .folder-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px) {
    .nav { padding:0 12px; }
    .nav-brand img { height:36px; }
    .nav-center { display:none; }
    .nav-links .btn-login { font-size:12px; padding:6px 10px; }
    .hero { padding:40px 16px 30px; }
    .hero-ut img { height:150px; }
    .server-grid { gap:6px; }
    .server-btn { padding:10px 6px; gap:5px; border-radius:8px; }
    .server-btn .icon { font-size:20px; }
    .folder-grid { grid-template-columns:repeat(2,1fr); }
    .container { padding:0 12px; }
    .viewer-iframe { height:280px; }
    .chat-img-btn, .chat-emoji-btn, .chat-pm-btn { padding:7px 9px; font-size:14px; }
}
@media (max-width:400px) { .server-grid { gap:4px; } .server-btn { padding:8px 4px; gap:4px; } .server-btn .icon { font-size:16px; } .folder-grid { grid-template-columns:1fr; } }

.nav-hamburger { display:none; background:none; border:none; color:var(--text); font-size:22px; cursor:pointer; padding:6px; }
@media (max-width:600px) { .nav-hamburger { display:block; } }

@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.servers-section, .viewer-section, .folders-section, .chat-section { animation:fadeUp 0.5s ease both; }
.viewer-section { animation-delay:0.1s; }
.folders-section { animation-delay:0.15s; }
