.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 20, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #111128;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    padding: 24px;
    min-width: 320px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15), 0 0 60px rgba(0, 240, 255, 0.05);
}

.modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 16px;
    color: #00f0ff;
    text-align: center;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding-bottom: 12px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

#saved-games-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.save-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.save-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.save-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: #e0e0ff;
}

.save-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #7a7a9a;
}

.no-saves {
    text-align: center;
    color: #7a7a9a;
    padding: 20px;
}

#share-link {
    width: 100%;
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    color: #e0e0ff;
    margin-bottom: 16px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: box-shadow 0.3s, background 0.2s;
    background: transparent;
    color: #7a7a9a;
}

.modal-btn:hover {
    color: #00f0ff;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.modal-btn.primary {
    background: linear-gradient(135deg, #cc44ff, #9900cc);
    color: white;
    border: none;
    box-shadow: 0 0 10px rgba(204, 68, 255, 0.3);
}

.modal-btn.primary:hover {
    box-shadow: 0 0 20px rgba(204, 68, 255, 0.5), 0 0 40px rgba(204, 68, 255, 0.2);
}

/* About Modal */
.about-content {
    max-width: 500px;
}

.about-content a {
    color: #00f0ff;
    text-decoration: none;
    transition: text-shadow 0.3s;
}

.about-content a:hover {
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.about-section {
    margin-bottom: 20px;
}

.about-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    color: #00f0ff;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.2);
}

.about-section p {
    font-size: 14px;
    color: #7a7a9a;
    line-height: 1.6;
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-section li {
    font-size: 13px;
    color: #7a7a9a;
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.about-section li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #00f0ff;
}

.about-content strong {
    color: #e0e0ff;
}

.faction-red {
    color: #ff2244;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 34, 68, 0.3);
}

/* Stats Modal */
.stats-content {
    max-width: 320px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 24px;
    margin-bottom: 20px;
}

.stats-grid dt {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #7a7a9a;
}

.stats-grid dd {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: #00f0ff;
    text-align: right;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

/* Mobile Modal Styles */
@media (max-width: 480px) {
    .modal-content {
        padding: 16px;
        min-width: unset;
        width: calc(100% - 32px);
        max-height: 70vh;
    }

    .modal-content h2 {
        font-size: 14px;
    }

    .save-item {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .modal-btn {
        padding: 12px 16px;
        min-height: 44px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .modal-buttons .modal-btn {
        width: 100%;
    }

    #share-link {
        font-size: 11px;
    }
}
