/* public/styles/modals/modalHangar.css */
:root {
    --hangar-primary-font: 'Roboto Mono', monospace;
    --hangar-accent-font: 'Press Start 2P', cursive;
    --hangar-glow-color: #00FFDC;
    --hangar-text-primary: #E0F0FF;
    --hangar-text-secondary: #A0C0E0;
}

.hangar-modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    backdrop-filter: blur(6px);
}

.hangar-modal.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}

.hangar-modal-content {
    background: linear-gradient(145deg, rgba(10, 25, 40, 0.97), rgba(20, 35, 55, 0.97));
    margin: auto;
    padding: 0; 
    border: 1px solid rgba(0, 255, 220, 0.6);
    border-radius: 15px; 
    width: 90%;
    max-width: 800px; 
    box-shadow: 0 10px 50px rgba(0, 255, 220, 0.7), 0 0 20px rgba(0,0,0,0.4);
    color: var(--hangar-text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    font-family: var(--hangar-primary-font);
}

.hangar-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(0, 255, 220, 0.4);
}

.hangar-modal-header h3 {
    font-family: var(--hangar-accent-font);
    color: var(--hangar-glow-color);
    margin: 0;
    font-size: 1.4em;
    font-weight: normal;
    text-shadow: 0 0 6px rgba(0, 255, 220, 0.8);
}

.hangar-modal-close-button {
    background: none;
    border: none;
    color: var(--hangar-text-secondary);
    font-size: 2.2em;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.hangar-modal-close-button:hover {
    color: var(--hangar-glow-color);
    transform: scale(1.1);
}

.hangar-modal-tabs {
    display: flex;
    background-color: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(0, 255, 220, 0.4);
}

.hangar-tab-button {
    flex: 1;
    padding: 12px 10px;
    background-color: transparent;
    border: none;
    color: var(--hangar-text-secondary);
    font-family: var(--hangar-primary-font);
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-bottom: 3px solid transparent;
}

.hangar-tab-button:hover {
    background-color: rgba(0, 255, 220, 0.1);
}

.hangar-tab-button.active {
    color: var(--hangar-glow-color);
    border-bottom: 3px solid var(--hangar-glow-color);
    font-weight: bold;
}

.hangar-modal-body {
    padding: 20px 25px 25px; 
    max-height: 70vh;
    overflow-y: auto;
    font-size: 0.9rem;
}

.hangar-tab-content {
    display: none;
}

.hangar-tab-content.active {
    display: block;
}

@keyframes float-animation {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}

#hangar-nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.nft-card {
    background: linear-gradient(145deg, rgba(15, 35, 60, 0.8), rgba(25, 45, 70, 0.8));
    border: 1px solid rgba(0, 255, 220, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nft-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    animation: float-animation 6s ease-in-out infinite;
}



.nft-card-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    justify-content: space-between;
}

.nft-card-name {
    font-family: var(--hangar-accent-font);
    font-size: 1.1em;
    color: var(--hangar-glow-color);
    text-shadow: 0 0 4px rgba(0, 255, 220, 0.6);
    margin-bottom: 5px;
}

.nft-card-id {
    font-family: var(--hangar-primary-font);
    font-size: 0.85em;
    color: var(--hangar-text-secondary);
    word-break: break-all;
    background-color: rgba(0,0,0,0.2);
    padding: 5px 8px;
    border-radius: 4px;
}

.nft-buy-license-button {
    background-color: transparent;
    border: 1px solid var(--hangar-glow-color);
    color: var(--hangar-glow-color);
    font-family: var(--hangar-accent-font);
    font-size: 0.8em;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-top: auto;
}

.nft-buy-license-button:hover {
    background-color: rgba(0, 255, 220, 0.2);
    box-shadow: 0 0 12px rgba(0, 255, 220, 0.5);
}

.hangar-modal-body::-webkit-scrollbar {
    width: 8px;
}
.hangar-modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}
.hangar-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 220, 0.5);
    border-radius: 4px;
}
.hangar-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 220, 0.8);
}

/* Styles for license generation animation */
.license-generation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 40, 0.95);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.license-generation-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease;
}

@keyframes background-pan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.license-generation-overlay .animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, #00ff88, #00a2ff, #ff8c00);
    background-size: 600% 600%;
    animation: background-pan 5s ease infinite;
    z-index: -1;
    opacity: 0.3;
}

.loading-bar-container {
    width: 80%;
    max-width: 400px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background-color: var(--hangar-glow-color);
    border-radius: 5px;
    transition: width 0.5s linear;
}

.loading-status-label {
    font-family: var(--hangar-primary-font);
    font-size: 0.9em;
    color: var(--hangar-text-secondary);
    letter-spacing: 1px;
}

.final-result-card {
    display: none;
    flex-direction: column;
    width: 350px;
    background: linear-gradient(145deg, #1a2332, #2a384f);
    border: 1px solid #5a6f8f;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 0 1px 1px rgba(255,255,255,0.1);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    overflow: hidden;
    font-family: 'Roboto Mono', monospace;
}

.final-result-card.visible {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

/* Header de la carte */
.card-header {
    padding: 15px 20px;
    background-color: rgba(0,0,0,0.2);
    text-align: center;
    border-bottom: 1px solid #5a6f8f;
}

.final-result-card .nft-card-name {
    font-family: var(--hangar-accent-font);
    font-size: 1.1em;
    color: var(--hangar-glow-color);
    text-shadow: 0 0 5px var(--hangar-glow-color);
    margin: 0;
}

/* Wrapper pour l'image et la bannière de rareté */
.nft-card-image-wrapper {
    position: relative;
    padding: 10px;
    background: linear-gradient(#2a384f, #1a2332);
}

.final-result-card .nft-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Bannière de Rareté */
.rarity-banner {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 25px;
    font-family: var(--hangar-accent-font);
    font-size: 0.9em;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    border-radius: 4px;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
}

.rarity-banner-common {
    background: linear-gradient(45deg, #8C8C8C, #B0B0B0);
    border-top: 1px solid #C8C8C8;
}
.rarity-banner-rare {
    background: linear-gradient(45deg, #1E88E5, #42A5F5);
    border-top: 1px solid #90CAF9;
}
.rarity-banner-legendary {
    background: linear-gradient(45deg, #F9A825, #FFC107);
    border-top: 1px solid #FFECB3;
}

/* Body de la carte contenant les passifs et les stats */
.card-body {
    padding: 15px;
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid #5a6f8f;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Section des éléments */
.element-section {
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px;
    border-left: 5px solid var(--element-color);
}

.element-icon {
    font-size: 2em;
    margin-right: 12px;
    text-shadow: 0 0 10px var(--element-color);
}

.element-details {
    flex-grow: 1;
}

.element-name {
    font-family: var(--hangar-accent-font);
    font-size: 1em;
    color: var(--element-color);
    margin-bottom: 4px;
}

.element-interactions {
    font-size: 0.75em;
    color: var(--hangar-text-secondary);
    display: flex;
    gap: 15px;
}

/* Section des stats principales */
.main-stats-section {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.main-stats-section .stat-item {
    flex: 1;
    background-color: rgba(0,0,0,0.25);
    border: 1px solid #4a5f7f;
    border-radius: 8px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.main-stats-section .stat-item:hover {
    background-color: rgba(0, 255, 220, 0.1);
    border-color: var(--hangar-glow-color);
}

.main-stats-section .stat-label {
    font-size: 0.7em;
    font-family: var(--hangar-accent-font);
    color: var(--hangar-text-secondary);
    margin-bottom: 5px;
}

.main-stats-section .stat-value {
    font-size: 1.4em;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

/* Section des passifs */
.passives-section {
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px;
}

.passives-title {
    font-family: var(--hangar-accent-font);
    font-size: 0.9em;
    color: var(--hangar-glow-color);
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #4a5f7f;
}

.passive-item {
    margin-bottom: 8px;
}

.passive-item:last-child {
    margin-bottom: 0;
}

.passive-name {
    font-family: var(--hangar-accent-font);
    font-size: 0.8em;
    color: var(--hangar-text-primary);
    margin-bottom: 3px;
}

.passive-description {
    font-size: 0.75em;
    color: var(--hangar-text-secondary);
    font-style: italic;
}


/* Styles pour le bouton de fermeture de l'overlay */
.result-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    border: 2px solid var(--hangar-glow-color);
    color: var(--hangar-glow-color);
    font-size: 1.5em;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1003;
}

.result-close-button:hover {
    background: rgba(0, 255, 220, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 220, 0.6);
    transform: scale(1.1);
}

/* Amélioration de l'animation des éléments */
.final-result-card .nft-card-image,
.final-result-card .nft-card-name,
.final-result-card .nft-card-id,
.final-result-card .stats-grid {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
