/* --- Styles for Initial Upload View --- */
.hidden {
    display: none !important;
}

.upload-box-large {
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    padding: 80px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
}

.upload-box-large.dragover {
    border-color: var(--primary-color);
    background: rgba(255, 77, 141, 0.05);
}

.upload-box-large i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-box-large h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
}

.upload-box-large .btn-primary {
    padding: 14px 40px;
    font-size: 1.1rem;
}

.secure-text {
    margin-top: 1.5rem;
    color: var(--text-color-light);
    font-size: 0.9rem;
}

.secure-text i {
    font-size: 1rem;
    vertical-align: middle;
    color: #2ecc71;
    /* Green lock icon */
}

/* --- Editor View Styles --- */
#editor-view {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
}

.options-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.option-group label {
    font-size: 0.8rem;
    color: var(--text-color-light);
    text-transform: uppercase;
}

.custom-select {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 130px;
}

.image-preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.image-preview-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    position: relative;
    cursor: grab;
    display: flex;
    flex-direction: column;
}

.image-preview-item:active {
    cursor: grabbing;
}

.preview-img-container {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background-color: #fff;
    border-radius: 4px;
}

.preview-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-info {
    font-size: 0.8rem;
    color: var(--text-color-light);
    margin-top: auto;
}

.item-controls {
    position: absolute;
    top: -12px;
    right: -12px;
    display: flex;
    gap: 6px;
}

.control-btn {
    background: #333;
    border: 1px solid var(--card-border);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.control-btn.rotate-btn {
    background-color: #007bff;
}

.control-btn.delete-btn {
    background-color: #dc3545;
}

.control-btn:hover {
    transform: scale(1.1);
}

.add-image-box {
    border: 2px dashed var(--card-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color-light);
    transition: all 0.3s ease;
    min-height: 175px;
}

.add-image-box:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.add-image-box i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.fixed-bottom-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.fixed-bottom-bar .btn-danger {
    background-color: #dc3545;
}

/* --- Custom Select Dropdown Styles --- */
.custom-select-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.original-select {
    display: none;
    /* Hide the original select */
}

.custom-select-container {
    position: relative;
    width: 180px;
    /* Adjust width as needed */
}

.custom-select-trigger {
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
}

.custom-select-trigger::after {
    content: '\ea6a';
    /* RemixIcon code for dropdown arrow */
    font-family: 'Remixicon';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.custom-select-container.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-options {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background-color: #2a2a3a;
    /* Dark background for options */
    border: 1px solid var(--card-border);
    border-radius: 8px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.custom-select-container.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    display: block;
    padding: 12px 15px;
    cursor: pointer;
    color: var(--text-color-light);
    transition: all 0.2s ease;
}

.custom-option:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.custom-option:first-of-type {
    border-radius: 8px 8px 0 0;
}

.custom-option:last-of-type {
    border-radius: 0 0 8px 8px;
}

/* Remove old select styles if they conflict */
.custom-select {
    display: none;
}