/* Velcord ISS Measurements - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
    min-height: 100vh;
    color: #fff;
}

/* Navigation */
nav {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(100, 200, 255, 0.3);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 50px;
    width: auto;
}

.nav-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #64c8ff;
    text-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #888;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: #64c8ff;
}

.nav-links a.active {
    color: #64c8ff;
    background: rgba(100, 200, 255, 0.1);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* Section titles */
.section-title {
    font-size: 2em;
    color: #64c8ff;
    margin: 40px 0 20px;
    border-bottom: 2px solid rgba(100, 200, 255, 0.3);
    padding-bottom: 10px;
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.4);
}

/* Intro sections */
.intro-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-section h2 {
    color: #64c8ff;
    margin-bottom: 15px;
}

.intro-section p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 15px;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(81, 207, 102, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.5em;
    color: #51cf66;
    margin-left: 15px;
    vertical-align: middle;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #51cf66;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Stats */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 150px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100, 200, 255, 0.2);
}

.stat-box .value {
    font-size: 1.8em;
    font-weight: bold;
    color: #64c8ff;
}

.stat-box .label {
    font-size: 0.9em;
    color: #888;
    margin-top: 5px;
}

.stat-box.error .value {
    color: #ff6b6b;
}

.stat-box.success .value {
    color: #51cf66;
}

/* Graph */
.graph-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-wrapper {
    position: relative;
    height: 500px;
    margin: 40px 60px 60px 80px;
}

.graph-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: visible;
}

/* Grid */
.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.grid-line-h {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.grid-line-v {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.05);
}

/* Reference and average lines */
.reference-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #51cf66;
    box-shadow: 0 0 5px rgba(81, 207, 102, 0.5);
}

.reference-label {
    position: absolute;
    right: 10px;
    transform: translateY(-50%);
    background: #51cf66;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
}

.average-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #ff6b6b;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

.average-label {
    position: absolute;
    left: 10px;
    transform: translateY(-50%);
    background: #ff6b6b;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
}

/* Graph line */
.graph-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.graph-line {
    fill: none;
    stroke: #64c8ff;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Data points */
.data-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ffa94d;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, 50%);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
}

.data-point:hover {
    transform: translate(-50%, 50%) scale(1.4);
    box-shadow: 0 0 15px rgba(255, 169, 77, 0.8);
}

.data-point.latest {
    background: #51cf66;
}

/* Tooltip */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    margin-bottom: 15px;
    z-index: 100;
    border: 1px solid rgba(100, 200, 255, 0.3);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.data-point:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Axes */
.y-axis {
    position: absolute;
    left: -70px;
    top: 0;
    bottom: 0;
    width: 60px;
}

.y-label {
    position: absolute;
    right: 10px;
    transform: translateY(-50%);
    font-size: 0.8em;
    color: #888;
}

.y-axis-title {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    font-size: 0.95em;
    color: #64c8ff;
    white-space: nowrap;
}

.x-axis {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -50px;
    height: 40px;
}

.x-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.8em;
    color: #888;
}

.x-axis-title {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.95em;
    color: #64c8ff;
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
}

.legend-color {
    width: 20px;
    height: 2px;
    border-radius: 1px;
}

.legend-color.reference {
    background: #51cf66;
}

.legend-color.average {
    background: #ff6b6b;
}

.legend-color.data {
    background: #64c8ff;
}

/* No data message */
.no-data {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    color: #444;
}

/* Photos gallery */
.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100, 200, 255, 0.15);
}

.photo-header {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    font-weight: bold;
    color: #64c8ff;
}

.photo-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s;
}

.photo-img:hover {
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ff6b6b;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #888;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    color: #444;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    .graph-wrapper {
        height: 350px;
        margin: 30px 40px 50px 60px;
    }
    
    .photos-gallery {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        gap: 10px;
    }
    
    .stat-box {
        min-width: 120px;
        padding: 15px 20px;
    }
}

/* Mobile navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #64c8ff;
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        border-bottom: 1px solid rgba(100, 200, 255, 0.3);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 12px 16px;
        text-align: center;
    }
    
    .nav-content {
        position: relative;
    }
}