/* VHSTech shared styles
   Common look-and-feel for every page. Page-specific styles stay inline. */

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151a3d;
    --accent-orange: #ff6b35;
    --accent-red: #ff3864;
    --accent-cyan: #00d9ff;
    --accent-purple: #a855f7;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --success-green: #10b981;

    --radius-btn: 10px;
    --radius-card: 14px;
    --radius-modal: 16px;
    --radius-pill: 22px;
}

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

body {
    font-family: 'Space Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ----- Animated background ----- */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.4;
}

.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--accent-cyan) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent-cyan) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    animation: gridScroll 20s linear infinite;
}

@keyframes gridScroll {
    0%   { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.32;
    animation: float 8s ease-in-out infinite;
}

.glow-orb:nth-child(1) {
    width: 400px;
    height: 400px;
    background: var(--accent-orange);
    top: 10%;
    left: 20%;
}

.glow-orb:nth-child(2) {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.glow-orb:nth-child(3) {
    width: 350px;
    height: 350px;
    background: var(--accent-purple);
    bottom: 10%;
    left: 40%;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(30px, 30px); }
    50%      { transform: translate(-20px, 40px); }
    75%      { transform: translate(20px, -30px); }
}

/* ----- Header / nav ----- */
header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(21, 26, 61, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-decoration: none;
}

.header-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ----- Buttons ----- */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-btn);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
}

.btn-secondary {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-cyan);
    border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
}

/* ----- Dropdown ----- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: var(--radius-btn);
    padding: 0.5rem 0 0.5rem;
    padding-top: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    margin-top: 0;
}

/* Invisible bridge so the dropdown stays open while moving cursor down */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-cyan);
}

/* ----- Animations shared by modals ----- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- Admin / generic modal ----- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-modal);
    border: 2px solid var(--accent-red);
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(255, 56, 100, 0.4);
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.modal-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.btn-cancel:hover {
    background: rgba(148, 163, 184, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 56, 100, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 56, 100, 0.6);
}

/* ----- Footer ----- */
footer {
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(0, 217, 255, 0.2);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

.footer-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-pill);
    color: var(--success-green);
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Space Mono', monospace;
    transition: all 0.3s;
    margin-top: 1rem;
}

.footer-status-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.footer-admin-notice {
    margin-top: 1.2rem;
}

.footer-admin-notice a {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s, color 0.3s;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.3);
    padding-bottom: 1px;
}

.footer-admin-notice a:hover {
    opacity: 1;
    color: var(--accent-cyan);
}

.footer-legal-links {
    margin-top: 0.8rem;
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-decoration: none;
    opacity: 0.45;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s, opacity 0.3s;
}

.footer-legal-links a:hover {
    color: var(--accent-cyan);
    opacity: 1;
}

/* ----- Page hero (used on most subpages) ----- */
.page-hero {
    padding: 6rem 2rem 4rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.page-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--accent-cyan), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.page-hero p,
.page-hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

/* ----- Shared dividers ----- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.3), transparent);
    margin: 2rem 0;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .page-hero h1 { font-size: 2.5rem; }
    .nav-buttons { flex-direction: column; gap: 0.5rem; }
    .header-content { flex-direction: column; gap: 1rem; }
    header { flex-direction: column; gap: 1rem; }
    .nav-links { gap: 1rem; }
}
