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

body {
    font-family: 'Geist Mono', 'Courier New', monospace;
    background-color: #0632FF;
    min-height: 100vh;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
}

.app {
    display: flex;
    flex-direction: column;
    height: var(--app-height, 100dvh);
    max-width: 400px;
    margin: 0 auto;
    background: #ffffff;
}

.header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #000000;
    background: #ffffff;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.5px;
    margin: 0;
}

.add-btn {
    background: #0632FF;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #0528CC;
    transform: translateY(-1px);
}

.main {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #DCDCDC;
    background-image: 
        linear-gradient(45deg, #FDFDFD 25%, transparent 25%),
        linear-gradient(-45deg, #FDFDFD 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #FDFDFD 75%),
        linear-gradient(-45deg, transparent 75%, #FDFDFD 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.cards-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    position: absolute;
    width: calc(100% - 40px);
    max-width: 350px;
    height: 500px;
    background: #ffffff;
    overflow: hidden;
    cursor: grab;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center bottom;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card:active {
    cursor: grabbing;
}

.card-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Empêcher les événements sur l'image */
    user-select: none; /* Empêcher la sélection d'image */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none; /* Empêcher le glisser-déposer sur l'image */
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.card-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.card-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.stat {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
}

.stat.yes {
    background: #e3f2fd;
    color: #0632FF;
}

.stat.no {
    background: #ffebee;
    color: #e53935;
}

.card-bio {
    font-size: 16px;
    color: #333333;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #e0e0e0;
    color: #000000;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
}

.card-overlay {
    position: absolute;
    top: 50px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: rotate(-30deg);
    transition: all 0.3s ease;
    z-index: 10;
}

.card-overlay.like {
    left: 20px;
    background: #0632FF;
    color: white;
    border: 3px solid #0632FF;
}

.card-overlay.nope {
    right: 20px;
    background: #f44336;
    color: white;
    border: 3px solid #f44336;
}

.card.swiping-left .card-overlay.nope {
    opacity: 1;
    transform: rotate(-30deg);
}

.card.swiping-right .card-overlay.like {
    opacity: 1;
    transform: rotate(30deg);
}

.footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    width: 60px;
    height: 60px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn:active {
    transform: scale(0.95);
}

.nope-btn {
    background: #e53935;
    color: #ffffff;
    border: none;
}

.nope-btn:hover {
    background: #e53935;
    color: #ffffff;
}

.like-btn {
    background: #0632FF;
    color: #ffffff;
    border: none;
}

.like-btn:hover {
    background: #0632FF;
    color: #ffffff;
}

/* Animation classes */
.card.swipe-left {
    animation: swipeLeft 0.5s ease-out forwards;
}

.card.swipe-right {
    animation: swipeRight 0.5s ease-out forwards;
}

@keyframes swipeLeft {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-100vw) rotate(-20deg);
        opacity: 0;
    }
}

@keyframes swipeRight {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) rotate(20deg);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .app {
        max-width: 100%;
        height: 100vh;
    }
    
    .card {
        width: calc(100% - 20px);
        height: 450px;
    }
    
    .card-image {
        height: 300px;
    }
    
    .action-btn {
        width: 50px;
        height: 50px;
    }
}

/* Effet de pile amélioré pour les cartes en arrière-plan */
.card:nth-child(n+2) {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.card:nth-child(n+3) {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.card:nth-child(n+4) {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Loading state */
.card.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--app-height, 100dvh);
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: calc(var(--app-height, 100dvh) * 0.9);
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #000000;
}

.form-group {
    margin-bottom: 20px;
    padding: 0 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000000;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    background: #ffffff;
    color: #000000;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000000;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    margin-top: 24px;
}

.cancel-btn,
.submit-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 0;
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.cancel-btn {
    background: #ffffff;
    color: #000000;
    border-color: #e0e0e0;
}

.cancel-btn:hover {
    background: #f0f0f0;
    border-color: #000000;
}

.submit-btn {
    background: #0632FF;
    color: #ffffff;
    border-color: #0632FF;
}

.submit-btn:hover {
    background: #0528CC;
    border-color: #0528CC;
    transform: translateY(-1px);
}

/* Empty state */
.empty-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state.show {
    display: block;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.5;
}
