.upload-area {
    border: 2px dashed #007bff;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0056b3;
    background: #e9ecef;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #d4edda;
}

.upload-placeholder {
    padding: 2rem;
}

.upload-placeholder i {
    color: #007bff;
}

.image-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.image-preview-item {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.gif-settings {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.gif-settings h5 {
    color: #495057;
    margin-bottom: 20px;
    font-weight: 600;
}

.gif-result {
    background: #d4edda;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.gif-result img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#loadingSection {
    background: #fff3cd;
    border-radius: 10px;
    padding: 30px;
    border: 1px solid #ffeaa7;
    text-align: center;
}

.progress {
    height: 20px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    transition: width 0.6s ease;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.form-range {
    margin-bottom: 10px;
}

#frameDelayValue {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-select, .form-range {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus, .form-range:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.card {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

.card-body {
    padding: 2rem;
}

/* 반응형 디자인 개선 */
@media (max-width: 768px) {
    .image-preview-item {
        margin-bottom: 15px;
    }

    .gif-settings {
        padding: 20px;
    }

    .upload-placeholder {
        padding: 1.5rem 1rem !important;
    }

    .upload-placeholder h5 {
        font-size: 1.1rem;
    }

    .upload-placeholder p {
        font-size: 0.9rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 10px;
    }

    .gif-result .btn-lg {
        width: auto;
        margin: 0 5px 10px 5px;
    }
}

@media (max-width: 576px) {
    .image-preview-item img {
        height: 100px;
    }

    .gif-settings .row {
        margin: 0 -5px;
    }

    .gif-settings .col-md-6 {
        padding: 0 5px;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }
}

/* 애니메이션 효과 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.gif-result {
    animation: fadeIn 0.5s ease-in;
}

/* 광고 관련 스타일 */
.inline-ad {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 1rem 0;
    animation: slideInDown 0.3s ease-out;
}

.inline-ad .ad-placeholder {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed #adb5bd;
    transition: all 0.3s ease;
}

.inline-ad .ad-placeholder:hover {
    border-color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
}

.inline-ad .btn-close {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 1.5em;
    height: 1.5em;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.inline-ad .btn-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* 모달 광고 스타일 */
#adModal .modal-content {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#adModal .ad-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #adb5bd;
    transition: all 0.3s ease;
}

#adModal .ad-placeholder:hover {
    border-color: #6c757d;
    transform: translateY(-2px);
}

/* 광고 로딩 애니메이션 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 광고 아이콘 스타일 */
.fa-ad {
    color: #6c757d;
    transition: color 0.3s ease;
}

.inline-ad:hover .fa-ad {
    color: #495057;
}