@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    background: #0d1117;
    color: #c9d1d9;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

#p5-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.site-player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Matrix rain effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(13, 17, 23, 0.85) 0%, rgba(22, 27, 34, 0.9) 100%),
        url('/assets/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
}

.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.02;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #58a6ff;
    overflow: hidden;
}

/* VSCode-style window */
.vscode-window {
    margin: 20px;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.15);
    border: 1px solid #30363d;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Title bar */
.title-bar {
    background: #2d2d30;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid #3e3e42;
    border-radius: 8px 8px 0 0;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27ca3f; }

.window-title {
    font-size: 13px;
    color: #cccccc;
    font-weight: 400;
}

/* Tab bar */
.tab-bar {
    background: #252526;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    height: 35px;
}

.tab {
    background: #2d2d30;
    border-right: 1px solid #3e3e42;
    padding: 8px 20px;
    color: #969696;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab.active {
    background: #1e1e1e;
    color: #dcdcaa;
}

.tab:hover {
    background: #37373d;
}

.file-icon {
    color: #58a6ff;
    font-size: 14px;
}

/* Main content area */
.main-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Sidebar */
.sidebar {
    width: 310px;
    background: #252526;
    border-right: 1px solid #3e3e42;
    overflow-y: auto;
}

/* Custom slim scrollbars */
.sidebar::-webkit-scrollbar,
.editor-area::-webkit-scrollbar,
.terminal::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.sidebar::-webkit-scrollbar-track,
.editor-area::-webkit-scrollbar-track,
.terminal::-webkit-scrollbar-track {
    background: #1e1e1e;
}
.sidebar::-webkit-scrollbar-thumb,
.editor-area::-webkit-scrollbar-thumb,
.terminal::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover,
.editor-area::-webkit-scrollbar-thumb:hover,
.terminal::-webkit-scrollbar-thumb:hover {
    background: #52525e;
}

.sidebar-section {
    padding: 10px;
    border-bottom: 1px solid #3e3e42;
}

.sidebar-title {
    color: #cccccc;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.file-tree {
    list-style: none;
}

.file-item {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
}

.file-item:hover {
    background: #2a2d2e;
}

.folder-icon {
    color: #d1a850;
}

.file-icon-small {
    color: #58a6ff;
}

/* Right panel */
.right-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100%;
}

/* Editor area */
.editor-area {
    flex: 1;
    background: #1e1e1e;
    padding: 10px 20px 20px 20px;
    overflow-y: auto;
}

.editor-area.iframe-mode {
    padding: 0;
    overflow: hidden;
}

.editor-area.iframe-mode iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* Terminal */
.terminal {
    background: #0c0c0c;
    border-top: 1px solid #3e3e42;
    height: 70px;
    padding: 8px 15px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    color: #cccccc;
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-content {
    color: #c9d1d9;
    font-size: 14px;
    line-height: 1.4;
}

.prompt {
    color: #58a6ff;
}

.command {
    color: #f85149;
}

.output {
    color: #7ee787;
    margin-left: 0;
}

/* Neon effects */
.neon-text {
    color: #58a6ff;
    text-shadow: 
        0 0 2px #58a6ff,
        0 0 4px #58a6ff;
}

.neon-border {
    border: 1px solid #58a6ff;
    box-shadow: 
        0 0 3px rgba(88, 166, 255, 0.3),
        inset 0 0 3px rgba(88, 166, 255, 0.1);
}

/* Hero section in editor */
.hero-content {
    text-align: center;
    padding: 30px 0 40px 0;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid #58a6ff;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
    display: block;
}

.main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #58a6ff, #7ee787, #f85149);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 30px;
}

.status-line {
    color: #7ee787;
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Story cards */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.story-card {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #58a6ff, #7ee787);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
    text-decoration: none;
    color: inherit;
}

.story-title {
    color: #58a6ff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.story-paper {
    color: #569cd6;
    font-size: 14px;
    margin-bottom: 15px;
}

.story-description {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.story-link {
    color: #58a6ff;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.story-link:hover {
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #f85149;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #58a6ff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, 2px); }
    80% { transform: translate(-2px, -2px); }
}

/* Cursor blink */
.cursor {
    animation: blink 1s infinite;
    color: #58a6ff;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(234, 179, 8, 0.5), 0 0 80px rgba(234, 179, 8, 0.2), 0 4px 20px rgba(0,0,0,0.4); }
    50% { box-shadow: 0 0 50px rgba(234, 179, 8, 0.6), 0 0 100px rgba(234, 179, 8, 0.3), 0 4px 20px rgba(0,0,0,0.4); }
}

/* Podcast platform links */
.podcast-platforms {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid #3e3e42;
    border-radius: 6px;
    color: #c9d1d9;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.platform-link:hover {
    border-color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
    transform: translateX(2px);
}

.platform-link i {
    color: #58a6ff;
    width: 16px;
    text-align: center;
}

.platform-link span {
    flex: 1;
}

/* Mission content styling (ChatGPT-like) */
.mission-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    color: #e3e3e3;
    line-height: 1.3;
}

.mission-content p {
    margin-bottom: 0.8em;
    font-size: 16px;
}

.mission-content strong {
    color: #58a6ff;
    font-weight: 600;
}

.mission-content em {
    font-style: italic;
    color: #58a6ff;
}

.mission-content hr {
    border: none;
    border-top: 1px solid #3e3e42;
    margin: 2em 0;
}

.mission-content img {
    max-width: 100%;
    height: auto;
    margin: 2em 0;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .vscode-window {
        margin: 10px;
    }
    
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 32px;
    }
}
