body {
    background-color: #f8f9fa;
}

.logo {
    max-height: 80px;
}

.card {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.5s ease-in-out;
}

.card-container {
    position: relative;
    min-height: 400px;
}

.card-slide {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.card-slide.active {
    position: relative;
    transform: translateX(0);
    opacity: 1;
    z-index: 1;
}

.card-slide.left {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 0;
}

.card-slide.right {
    transform: translateX(100%);
    opacity: 0;
    z-index: 0;
}

.template-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    padding-bottom: 10px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.template-option.selected {
    border-color: #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.5);
    transform: translateY(-5px);
}

.template-option img {
    width: 100%;
    height: auto;
    border-radius: 7px 7px 0 0;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.template-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 7px 7px 0 0;
    margin-bottom: 10px;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    padding-bottom: 100%;
    height: 0;
}

.template-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(13, 110, 253, 0.2);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
    z-index: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.template-image-container video {
    width: 100%;
    height: auto;
    border-radius: 7px 7px 0 0;
    margin-bottom: 10px;
}

.loading-text {
    margin-top: 10px;
    font-weight: 500;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    border: 1px solid #dee2e6;
}

.preview-btn {
    margin-top: 5px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preview-btn:hover {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.template-option .preview-btn:focus {
    box-shadow: none;
}

.font-option {
    cursor: pointer;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.font-option:hover {
    background-color: #f8f9fa;
}

.font-option.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.font-opensans {
    font-family: 'Open Sans', sans-serif;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

.font-merriweather {
    font-family: 'Merriweather', serif;
}

.font-roboto {
    font-family: 'Roboto', sans-serif;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.gallery-item {
    width: 120px;
    height: 120px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    cursor: grab;
    transition: all 0.2s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item.selected {
    border-color: #0d6efd;
}

.gallery-item.inactive {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-item .position-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(13, 110, 253, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.gallery-item.ui-sortable-helper {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-placeholder {
    background-color: rgba(13, 110, 253, 0.1);
    border: 2px dashed #0d6efd;
    border-radius: 5px;
}

.template-name {
    font-weight: 600;
    color: #495057;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.template-option.selected .template-name {
    color: #0d6efd;
}

.logo-preview-container {
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.logo-preview-container:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#logo-preview {
    max-width: 100%;
}

.template-preview-container {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 7px 7px 0 0;
    background-color: #f8f9fa;
}

.template-preview-container .konvajs-content {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.template-preview-container canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.template-image-container .template-preview-container {
    width: 100%;
    height: auto;
    border-radius: 7px 7px 0 0;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.template-image-container .template-preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#remove-logo {
    transition: all 0.2s ease;
}

#remove-logo:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}