.upload-area {
    border: 2px dashed var(--accent-primary);
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-primary-light);
    background: rgba(59, 111, 224, 0.1);
}

.upload-area.dragover {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.15);
}

.upload-placeholder {
    padding: 2rem;
}

.upload-placeholder i {
    color: var(--accent-primary);
}

.upload-placeholder h5 {
    color: var(--text-primary);
}

.upload-placeholder p {
    color: var(--text-secondary);
}

.image-preview {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.image-preview-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    transition: transform 0.2s ease;
}

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

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

.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;
    z-index: 15;
    pointer-events: auto;
}

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

.gif-settings {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.gif-settings h5 {
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.image-preview h5 {
    color: var(--accent-primary);
}

.gif-result {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--accent-success);
    text-align: center;
}

.gif-result h5 {
    color: var(--accent-success);
}

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

#loadingSection {
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    padding: 30px;
    border: 1px solid var(--accent-warning);
    text-align: center;
    color: var(--text-primary);
}

.progress {
    height: 20px;
    border-radius: 10px;
    background-color: #e6e9ef;
    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;
}

.tool-page .progress-bar {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-success));
}

.tool-page .card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.tool-page .card-body {
    color: var(--text-primary);
}

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

#frameDelayValue {
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 1.1em;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-select, .form-range {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #f1f3f7;
    color: var(--text-primary);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus, .form-range:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 111, 224, 0.25);
    background: rgba(59, 111, 224, 0.05);
    outline: none;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-check-label {
    color: var(--text-primary);
}

.form-range::-webkit-slider-thumb {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary-light);
}

.form-range::-moz-range-thumb {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary-light);
}

.gif-settings small {
    color: var(--text-secondary);
}

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






/* 반응형 디자인 개선 */
@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 var(--border-color);
    border-radius: 0.375rem;
    background: #ffffff;
    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: #f1f3f7;
    border: 2px dashed var(--border-color-light);
    transition: all 0.3s ease;
}

.inline-ad .ad-placeholder:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 111, 224, 0.1);
}

.inline-ad .btn-close {
    background: #e6e9ef;
    border-radius: 50%;
    width: 1.5em;
    height: 1.5em;
    opacity: 0.7;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

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

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

#adModal .ad-placeholder {
    background: #f1f3f7;
    border: 2px dashed var(--border-color-light);
    transition: all 0.3s ease;
}

#adModal .ad-placeholder:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    background: rgba(59, 111, 224, 0.1);
}

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

/* 광고 아이콘 스타일 */
.fa-ad {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.inline-ad:hover .fa-ad {
    color: var(--text-secondary);
}