.container-fluid {
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE4B5 50%, #FFD93D 100%);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 184, 0, 0.15);
    border: 1px solid rgba(255, 184, 0, 0.2);
    gap: 20px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left h1 {
    color: #E67300;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 800;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-back {
    text-decoration: none;
    color: #E67300;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE4B5 100%);
    border-radius: 50px;
    border: 2px solid #FF8C00;
}

.btn-back:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 140, 0, 0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.paste-hint {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.quotes-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(255, 184, 0, 0.15);
    border: 1px solid rgba(255, 184, 0, 0.2);
    transition: all 0.3s;
}

.panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(255, 184, 0, 0.25);
}

.panel h2 {
    font-size: 1.4rem;
    color: #E67300;
    margin-bottom: 20px;
    font-weight: 800;
    border-bottom: 3px solid #FFD93D;
    padding-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.form-group.full textarea {
    min-height: 160px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

label {
    font-weight: 700;
    color: #E67300;
    font-size: 0.95rem;
}

input[type="text"],
input[type="color"],
select,
textarea {
    border: 2px solid rgba(255, 184, 0, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #FFF9E6;
    color: #2D2D2D;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: #FF8C00;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.15);
    outline: none;
}

input[type="color"] {
    padding: 4px;
    border-radius: 10px;
    cursor: pointer;
}

input[type="file"] {
    padding: 8px 0;
}

textarea {
    line-height: 1.6;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-row span {
    min-width: 45px;
    text-align: right;
    color: #E67300;
    font-weight: 700;
    font-size: 0.95rem;
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.form-panel {
    display: none;
}

.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.canvas-wrapper {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE4B5 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    min-height: 70vh;
    border: 2px solid #FFD93D;
    background-size: cover;
    background-position: center;
}

.canvas-wrapper.dragover {
    outline: 3px dashed #FF8C00;
    background: linear-gradient(135deg, #FFE4B5 0%, #FFD93D 100%);
}

.canvas-wrapper canvas {
    max-width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.25);
    background: #0f172a;
    border: 3px solid rgba(255, 184, 0, 0.3);
}

.preview-info {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.list-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bg-gallery-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bg-gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
}

.bg-card {
    position: relative;
    border-radius: 14px;
    max-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.bg-card-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.bg-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 140, 0, 0.3);
}

.bg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0.1));
}

.bg-card-actions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 1;
}

.quotes-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.quote-card {
    position: relative;
    border-radius: 18px;
    padding: 28px;
    color: white;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.quote-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(255, 140, 0, 0.25);
}

.quote-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 18px;
}

.quote-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quote-card-text {
    font-size: 1.1rem;
    line-height: 1.7;
    max-height: 150px;
    overflow: hidden;
    font-weight: 500;
}

.quote-card-author {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 600;
}

.quote-card-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-small:hover {
    transform: translateY(-2px);
}

.btn-small.primary {
    background: linear-gradient(135deg, #FFD93D 0%, #FFB74D 100%);
    color: #E67300;
    box-shadow: 0 4px 12px rgba(255, 184, 0, 0.3);
}

.btn-small.primary:hover {
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.4);
}

.btn-small.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-small.secondary:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-small.danger {
    background: linear-gradient(135deg, #FF8E8E 0%, #FF6B6B 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-small.danger:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 50px 20px;
    border: 2px dashed #FFD93D;
    border-radius: 16px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE4B5 100%);
    font-weight: 500;
}

@media (max-width: 980px) {
    .quotes-layout {
        grid-template-columns: 1fr;
    }
}
