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

/* Selection color matching site style */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    background: #030308;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: rgba(0, 212, 255, 0.1);
    -webkit-touch-callout: none;
}

#spaceCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.glass-panel {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 50px 60px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 212, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-width: 580px;
    width: 100%;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 212, 255, 0.4),
        transparent);
    border-radius: 24px 24px 0 0;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.info-group {
    margin-bottom: 24px;
}

.info-group:last-child {
    margin-bottom: 0;
}

.label {
    color: rgba(0, 212, 255, 0.6);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.value {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.5;
}

a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    color: rgba(0, 212, 255, 1);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.65;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.more-info-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.8);
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.more-info-btn:hover {
    color: rgba(0, 212, 255, 1);
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2), inset 0 0 20px rgba(0, 212, 255, 0.05);
}

.more-info-btn:hover::before {
    left: 100%;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 3, 8, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    padding: 40px 45px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(0, 212, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.5), transparent);
}

.modal-close,
.panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover,
.panel-close:hover {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.3);
}

.modal-close::before,
.modal-close::after,
.panel-close::before,
.panel-close::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.3s ease;
}

.modal-close:hover::before,
.modal-close:hover::after,
.panel-close:hover::before,
.panel-close:hover::after {
    background: rgba(255, 100, 100, 0.8);
}

.modal-close::before,
.panel-close::before {
    transform: rotate(45deg);
}

.modal-close::after,
.panel-close::after {
    transform: rotate(-45deg);
}

.glass-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 28px;
    padding-right: 40px;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.modal-highlight {
    color: rgba(0, 212, 255, 0.9);
    font-weight: 500;
}

.modal-link {
    color: rgba(0, 212, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.modal-link:hover {
    color: rgba(0, 212, 255, 1);
    border-bottom-color: rgba(0, 212, 255, 0.8);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.modal-idno {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-idno .label {
    color: rgba(0, 212, 255, 0.5);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.modal-idno .value {
    font-family: 'Orbitron', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

@media (max-width: 640px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .glass-panel {
        min-height: 100vh;
        min-height: 100dvh;
        max-width: 100%;
        border-radius: 0;
        padding: 40px 30px;
        padding-top: max(40px, calc(env(safe-area-inset-top) + 20px));
        padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 20px));
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    h1 {
        font-size: 1.25rem;
        margin-bottom: 30px;
        letter-spacing: 1px;
    }

    .value {
        font-size: 0.95rem;
    }

    .description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .more-info-btn {
        padding: 12px 24px;
        font-size: 0.6rem;
    }

    .modal {
        padding: 30px 25px;
        border-radius: 16px;
    }

    .modal-title {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .modal-content p {
        font-size: 0.85rem;
        line-height: 1.65;
    }
}
