/**
 * About Popup with Star Animation
 * Appears from tiny stars with slow fade-in effect
 */

/* Overlay for about popup */
.about-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

/* Star particles container */
.about-stars-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    pointer-events: none;
    z-index: 4998;
}

/* Individual star particles */
.about-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: star-appear 1.5s ease-out forwards;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

@keyframes star-appear {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

/* About popup content */
.about-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 450px;
    max-height: 85vh;
    background: linear-gradient(135deg, rgba(30, 37, 53, 0.95), rgba(26, 26, 46, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(102, 126, 234, 0.2);
    padding: 0;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 1.2s ease 1s, transform 1.2s ease 1s;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 5001;
}

.about-popup-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 25px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 5002;
    pointer-events: auto;
    touch-action: pan-y;
}

.about-popup-overlay.active .about-popup-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Close button */
.about-close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5003;
    pointer-events: auto;
    touch-action: manipulation;
}

.about-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: rotate(90deg);
}

/* About content */
.about-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.about-popup-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-popup-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.8px;
}

.about-popup-body {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
}

.about-popup-body h3 {
    color: rgba(102, 126, 234, 0.9);
    font-size: 1rem;
    margin-top: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.about-popup-body p {
    margin-bottom: 12px;
}

.about-popup-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 12px;
}

.about-popup-body li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.about-popup-body li:before {
    content: '✦';
    position: absolute;
    left: 0;
    color: rgba(102, 126, 234, 0.7);
    font-size: 0.75rem;
}

.about-popup-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.about-popup-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .about-stars-container {
        width: 90vw;
        height: 60vh;
    }

    .about-popup-content {
        padding: 25px 20px;
        max-width: 90%;
    }

    .about-popup-title {
        font-size: 1.2rem;
    }

    .about-popup-subtitle {
        font-size: 0.8rem;
    }

    .about-popup-body {
        font-size: 0.82rem;
    }

    .about-popup-body h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .about-popup-content {
        padding: 20px 15px;
        max-width: 92%;
    }

    .about-popup-title {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .about-popup-subtitle {
        font-size: 0.75rem;
    }

    .about-popup-body {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    .about-popup-body h3 {
        font-size: 0.9rem;
        margin-top: 15px;
    }

    .about-popup-body li {
        font-size: 0.76rem;
    }
}
