/* Body */
body {
    background: #f4f6f9;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
}

/* Container */
.passport-container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

/* Card */
.card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: none;
    border: 1px solid #eee;
}

/* Title */
.title {
    margin-bottom: 20px;
}

/* Person Buttons */
.person-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.person-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.person-btn:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Upload Grid */
.upload-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0;
}

/* Upload Box */
.upload-box {
    border: 2px dashed #ccc;
    padding: 20px;
    cursor: pointer;
    width: 130px;
    text-align: center;
    border-radius: 12px;
    transition: 0.3s;
}

.upload-box:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

/* Preview Section */
.preview-section {
    margin-top: 20px;
}

#previewContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Preview Image Card */
.preview-card {
    position: relative;
    width: 120px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Remove Button */
.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
}

/* Controls */
.controls {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.control-group input {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Generate Button */
.generate-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.generate-btn:hover {
    background: #0056b3;
}

/* =========================
   MODAL (Crop UI)
========================= */
.crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.hidden {
    display: none;
}

.crop-box {
    background: white;
    width: 500px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.crop-header {
    background: #2b7cff;
    color: white;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crop-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.crop-body {
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.crop-body img {
    max-width: 100%;
    max-height: 100%;
}

/* Crop Actions */
.crop-actions {
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.crop-actions button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#cancelCrop {
    background: #ccc;
}

#applyCrop {
    background: #28a745;
    color: white;
}

