/* Vista Particle - Premium Dark Glassmorphism Theme
 * Shared template for rahatol.com sites
 * Uses local Noto Sans fonts
 */

/* Local Noto Sans fonts */
@font-face {
    font-family: 'Noto Sans';
    src: url('/static/fonts/noto/noto-sans-v36-latin-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('/static/fonts/noto/noto-sans-v36-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('/static/fonts/noto/noto-sans-v36-latin-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('/static/fonts/noto/noto-sans-v36-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('/static/fonts/noto/noto-sans-v36-latin-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans Mono';
    src: url('/static/fonts/noto/noto-sans-mono-v30-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-red: #ff6b6b;
    --particle-color: rgba(0, 212, 255, 0.8);
    --line-color: rgba(0, 212, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-card-bg: rgba(10, 10, 26, 0.25);
}

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

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Particle Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Stars background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: white;
    animation: twinkle var(--duration, 3s) ease-in-out infinite;
    opacity: 0;
}

.star.green-glow {
    background: var(--accent-green);
    box-shadow: 0 0 8px 3px rgba(16, 185, 129, 0.9);
    width: 3px;
    height: 3px;
}

.star.red-glow {
    background: var(--accent-red);
    box-shadow: 0 0 6px 2px rgba(255, 107, 107, 0.7);
    width: 3px;
    height: 3px;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: var(--opacity, 0.7); }
}

/* Content layer */
.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/* Scrollable content layer */
.content-scroll {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 2rem;
}

/* Glassmorphism card */
.glass-card {
    background: var(--glass-card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 3rem 4rem;
    text-align: center;
    max-width: 600px;
    animation: cardFadeIn 1s ease-out 0.5s both;
}

.glass-card-wide {
    background: var(--glass-card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    animation: cardFadeIn 0.6s ease-out both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Typography */
h1 {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 50%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tagline {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.tagline span {
    margin: 0 0.75rem;
    opacity: 0.4;
}

p, li {
    color: var(--text-secondary);
}

a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Link grid for directories */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: var(--accent-purple);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.2);
}

.link-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.link-content {
    flex-grow: 1;
    overflow: hidden;
}

.link-title {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.link-url {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: 'Noto Sans Mono', monospace;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation links */
.nav-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.nav-links a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 26px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-links a svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.25);
}

.nav-links a:hover svg {
    transform: scale(1.1);
}

/* Hover box tooltip */
.hover-box {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.hover-box .hover-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-purple);
    display: block;
}

.hover-box .hover-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: block;
}

.nav-links a:hover .hover-box {
    opacity: 1;
    visibility: visible;
}

/* Directory link box */
.directory-link {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
}

.directory-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    color: var(--accent-purple);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.directory-link a:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.2);
}

.directory-link a::after {
    content: '→';
    transition: transform 0.3s ease;
}

.directory-link a:hover::after {
    transform: translateX(4px);
}

/* Stardate display */
.stardate {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
}

.stardate-label {
    opacity: 0.5;
    margin-right: 0.5rem;
}

.stardate-value {
    color: var(--accent-cyan);
    font-weight: 500;
}

/* Status light */
#status-light {
    position: fixed;
    top: 25px;
    left: 25px;
    width: 12px;
    height: 12px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-green);
    z-index: 9999;
    transition: all 0.3s ease;
}

#status-light.offline {
    background: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red);
}

/* Form elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

/* Buttons */
.action-btn {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.3);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Code blocks */
pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
}

code {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.9em;
    color: var(--accent-cyan);
}

pre code {
    color: #fab1a0;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 0 10px 10px 0;
}

blockquote p {
    margin: 0;
    color: var(--text-primary);
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-white { color: var(--text-primary) !important; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'Noto Sans Mono', monospace; }
.text-center { text-align: center; }

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .glass-card {
        padding: 2rem;
        margin: 1rem;
    }

    .glass-card-wide {
        padding: 1.5rem;
    }

    .container {
        padding: 1rem;
    }

    .stardate {
        top: 1rem;
        right: 1rem;
        font-size: 0.65rem;
    }

    #status-light {
        top: 15px;
        left: 15px;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }
}
