/* ==========================================
   HIKARI SERVER - LANDING PAGE
   Futuristic Cyberpunk Dashboard Theme
   ========================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0d1321;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(20, 35, 60, 0.85);
    --border-color: rgba(56, 189, 248, 0.15);
    --border-glow: rgba(56, 189, 248, 0.4);

    --cyan: #22d3ee;
    --cyan-bright: #67e8f9;
    --cyan-dim: rgba(34, 211, 238, 0.15);

    --green: #4ade80;
    --green-bright: #86efac;
    --green-dim: rgba(74, 222, 128, 0.15);

    --amber: #fbbf24;
    --red: #f87171;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;

    --font-display: 'Orbitron', monospace;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Grid */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Scanline Effect */
.scanline {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.08) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Glow Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(34, 211, 238, 0.08);
    top: -10%;
    left: -5%;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(74, 222, 128, 0.06);
    bottom: 10%;
    right: -5%;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(56, 189, 248, 0.05);
    top: 50%;
    left: 50%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 30px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, -50px); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%); }
    50% { transform: translate(-40%, -60%); }
}

/* Particles */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--cyan);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* ==========================================
   HEADER
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--cyan);
    animation: logoPulse 3s ease-in-out infinite;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.4));
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(34, 211, 238, 0.6)); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
    line-height: 1.1;
}

.logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 3px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.live-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--green);
    letter-spacing: 2px;
}

/* ==========================================
   MAIN
   ========================================== */
.main {
    position: relative;
    z-index: 2;
    padding-top: 100px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 3rem;
}

/* ==========================================
   HERO - SERVER STATUS
   ========================================== */
.hero-section {
    margin-bottom: 2.5rem;
}

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.5;
}

.server-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.1);
}

.server-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.server-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--amber);
}

.server-status-badge.online {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: var(--green);
}

.server-status-badge.offline {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--red);
}

.status-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px currentColor; }
    50% { opacity: 0.5; box-shadow: 0 0 15px currentColor; }
}

.server-uptime {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.uptime-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.uptime-value {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--cyan);
}

.server-url {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(34, 211, 238, 0.1);
}

.url-protocol {
    color: var(--text-dim);
}

.url-domain {
    color: var(--cyan-bright);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

.server-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.metric-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

/* ==========================================
   DASHBOARD GRID
   ========================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.3), transparent);
}

.card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(34, 211, 238, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 36px;
    height: 36px;
    color: var(--cyan);
    padding: 7px;
    background: var(--cyan-dim);
    border-radius: 10px;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
    flex: 1;
}

.card-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 0.25rem 0.6rem;
    background: var(--cyan-dim);
    color: var(--cyan);
    border-radius: 4px;
    letter-spacing: 1px;
}

/* Clock Card */
.clock-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.clock-hours, .clock-minutes, .clock-seconds {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
    line-height: 1;
    min-width: 80px;
    text-align: center;
}

.clock-seconds {
    font-size: 2.5rem;
    color: var(--green);
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.clock-separator {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--text-dim);
    animation: blink 1s step-end infinite;
    line-height: 1;
}

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

.clock-date {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.clock-timezone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.tz-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

/* Analog Clock */
.analog-clock {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.analog-face {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(34, 211, 238, 0.2);
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.05), transparent 70%);
}

.analog-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 2px;
}

.hour-hand {
    width: 3px;
    height: 30px;
    background: var(--cyan);
    margin-left: -1.5px;
    box-shadow: 0 0 5px rgba(34, 211, 238, 0.4);
}

.minute-hand {
    width: 2px;
    height: 42px;
    background: var(--cyan-bright);
    margin-left: -1px;
    box-shadow: 0 0 5px rgba(34, 211, 238, 0.3);
}

.second-hand {
    width: 1px;
    height: 48px;
    background: var(--green);
    margin-left: -0.5px;
    box-shadow: 0 0 4px rgba(74, 222, 128, 0.4);
}

.analog-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

/* Weather Card */
.weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.weather-temp {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--amber);
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.weather-condition {
    font-size: 3rem;
    line-height: 1;
}

.weather-condition svg {
    width: 60px;
    height: 60px;
}

.weather-loading {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(251, 191, 36, 0.2);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.weather-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: capitalize;
    margin-bottom: 1.25rem;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.weather-detail svg {
    width: 18px;
    height: 18px;
    color: var(--cyan);
    flex-shrink: 0;
}

.detail-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    display: block;
}

.detail-value {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-primary);
    display: block;
}

/* System Card */
.system-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.sys-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.sys-status {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    background: rgba(251, 191, 36, 0.1);
    color: var(--amber);
}

.sys-status.online {
    background: rgba(74, 222, 128, 0.1);
    color: var(--green);
}

.sys-status.offline {
    background: rgba(248, 113, 113, 0.1);
    color: var(--red);
}

.sys-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.sys-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px rgba(34, 211, 238, 0.3);
}

.sys-fill.response-fill {
    background: linear-gradient(90deg, var(--amber), var(--cyan));
}

.sys-fill.avail-fill {
    background: linear-gradient(90deg, var(--green), var(--green-bright));
}

.ping-log {
    max-height: 120px;
    overflow-y: auto;
    padding: 0.75rem;
    background: rgba(10, 14, 26, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ping-log::-webkit-scrollbar {
    width: 4px;
}

.ping-log::-webkit-scrollbar-track {
    background: transparent;
}

.ping-log::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.ping-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ping-entry:last-child {
    border-bottom: none;
}

.ping-time {
    color: var(--text-dim);
    flex-shrink: 0;
    min-width: 60px;
}

.ping-status {
    color: var(--text-secondary);
}

.ping-status.success {
    color: var(--green);
}

.ping-status.error {
    color: var(--red);
}

.ping-status.waiting {
    color: var(--text-dim);
}

/* Links Card */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.link-item:hover {
    background: rgba(20, 35, 60, 0.6);
    border-color: var(--border-glow);
    transform: translateX(4px);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.1);
}

.link-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: var(--cyan-dim);
    border-radius: 10px;
    color: var(--cyan);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.link-icon svg {
    width: 100%;
    height: 100%;
}

.link-item:hover .link-icon {
    background: rgba(34, 211, 238, 0.25);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.link-icon.refresh-icon {
    background: var(--green-dim);
    color: var(--green);
}

.link-item:hover .link-icon.refresh-icon {
    background: rgba(74, 222, 128, 0.25);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
}

.link-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-name {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.link-url {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.link-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.link-item:hover .link-arrow {
    color: var(--cyan);
    transform: translateX(3px);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 1px;
}

.footer-divider {
    color: var(--text-dim);
    margin: 0 0.5rem;
}

.footer-location {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.footer-credit {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Glitch effect for title */
@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    96% { transform: translate(-1px, -1px); }
    98% { transform: translate(1px, 1px); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1.25rem;
    }

    .main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .clock-hours, .clock-minutes {
        font-size: 2.5rem;
        min-width: 60px;
    }

    .clock-seconds {
        font-size: 1.8rem;
    }

    .clock-separator {
        font-size: 2rem;
    }

    .server-metrics {
        flex-direction: column;
        gap: 1rem;
    }

    .metric-divider {
        display: none;
    }

    .server-url {
        font-size: 0.85rem;
    }

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

    .footer {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .clock-hours, .clock-minutes {
        font-size: 2rem;
        min-width: 50px;
    }

    .clock-seconds {
        font-size: 1.5rem;
    }

    .clock-separator {
        font-size: 1.5rem;
    }

    .weather-temp {
        font-size: 2.5rem;
    }
}
