:root {
    --bg-color: #050505;
    --primary: #00ffcc;
    --secondary: #bd00ff;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, .logo, .sys-msg, pre, .btn {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: url('data:image/svg+xml;utf8,<svg width="4" height="4" xmlns="http://www.w3.org/2000/svg"><rect width="4" height="4" fill="none"/><rect width="1" height="1" fill="rgba(0,255,204,0.05)"/></svg>');
    pointer-events: none;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.terminal-body {
    padding: 3rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    max-width: 800px;
    width: 100%;
}

.terminal-header {
    background: #1a1a1a;
    width: 100%;
    max-width: 800px;
    padding: 10px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    gap: 8px;
    border: 1px solid var(--glass-border);
    border-bottom: none;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.sys-msg {
    color: var(--primary);
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.glitch {
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: white;
    margin: 2rem 0 1rem;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.cyber-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cyber-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Vault Styling */
.vault-container {
    border-radius: 8px;
    overflow: hidden;
    margin-top: -2rem;
}

.vault-header {
    display: flex;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 2rem;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    color: var(--primary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--glass-border);
}

.vault-body {
    max-height: 600px;
    overflow-y: auto;
}

.file-row {
    display: flex;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.file-row:hover {
    background: rgba(0, 255, 204, 0.05);
    padding-left: 2.2rem;
}

.col-name { flex: 2; display: flex; align-items: center; gap: 10px; font-weight: 500;}
.col-size { flex: 1; color: var(--text-muted); font-family: 'Fira Code', monospace;}
.col-date { flex: 1; color: var(--text-muted); font-family: 'Fira Code', monospace;}

.file-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(0,255,204,0.3));
}

.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .glitch { font-size: 2.5rem; }
    .nav-links { display: none; }
    .col-size, .col-date { display: none; }
}

/* Actions Column & Buttons */
.col-actions {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.file-trigger {
    cursor: pointer;
}
.file-trigger:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

.cyber-btn-small {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.cyber-btn-small:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
}

/* Viewer & Preview Modals */
.overlay-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.viewer-header, .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--primary);
}

#pdf-iframe {
    flex-grow: 1;
    width: 100%;
    border: none;
    background: #e0e0e0;
}

.preview-container {
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

#preview-canvas-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

#preview-canvas-container canvas {
    max-width: 100%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}
