.sticker-page {
    max-width: var(--small-width);
    margin: 0 auto;
    padding: 30px;
}

.sticker-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

.sticker-config {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: fit-content;
}

.config-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-section-title::before {
    content: '📝';
    font-size: 18px;
}

.config-section {
    margin-bottom: 24px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-label {
    display:block;
    font-size:13px;
    color:#64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-option {
    padding: 10px 14px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all 0.3s ease;
    background: #ffffff;
}

.template-option:hover {
    background: #f8fafc;
}

.template-option.active {
    border-color: #ec4899;
    background: #fef2f7;
}

.template-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.template-icon.blue {
    background-color: #3b82f6;
}

.template-icon.animal {
    background-color: #f59e0b;
}

.template-icon.plant {
    background-color: #10b981;
}

.template-icon.space {
    background-color: #8b5cf6;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}

.input-field input,
.input-field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}

.input-field input:focus,
.input-field textarea:focus {
    outline: none;
    border-color: #ec4899;
}

.count-selector {
    display: flex;
    gap: 10px;
}

.count-btn {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: all 0.3s ease;
}

.count-btn:hover {
    border-color: #ec4899;
}

.count-btn.active {
    border-color: #ec4899;
    background: #ec4899;
    color: #fff;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.reset-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.print-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.print-btn:hover {
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.4);
}

.sticker-preview {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-title::before {
    content: '👁️';
    font-size: 18px;
}

.preview-count {
    font-size: 13px;
    color: #64748b;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
}



.name-sticker {
    width: 100%;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: none;
    border: 3px solid #3b82f6;
    background: #fff;
}

.sticker-blue {
    border-color: #3b82f6;
}

.sticker-blue .sticker-content {
    border-color: #3b82f6;
}

.sticker-blue .sticker-label {
    background: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

.sticker-blue .sticker-value {
    border-bottom: 2px solid #3b82f6;
}

.sticker-animal {
    border-color: #f59e0b;
}

.sticker-animal .sticker-content {
    border-color: #f59e0b;
}

.sticker-animal .sticker-label {
    background: #f59e0b;
    border-bottom: 2px solid #f59e0b;
}

.sticker-animal .sticker-value {
    border-bottom: 2px solid #f59e0b;
}

.sticker-plant {
    border-color: #10b981;
}

.sticker-plant .sticker-content {
    border-color: #10b981;
}

.sticker-plant .sticker-label {
    background: #10b981;
    border-bottom: 2px solid #10b981;
}

.sticker-plant .sticker-value {
    border-bottom: 2px solid #10b981;
}

.sticker-space {
    border-color: #8b5cf6;
}

.sticker-space .sticker-content {
    border-color: #8b5cf6;
}

.sticker-space .sticker-label {
    background: #8b5cf6;
    border-bottom: 2px solid #8b5cf6;
}

.sticker-space .sticker-value {
    border-bottom: 2px solid #8b5cf6;
}

.sticker-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    border: 2px dashed #3b82f6;
    border-radius: 4px;
    padding: 8px;
    z-index: 1;
}

.sticker-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.sticker-label {
    background: #3b82f6;
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.sticker-value {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    border-bottom: 2px solid #3b82f6;
}

@page {
    size: A4 portrait;
    margin: 0;
}

@page :first {
    margin: 0;
}

@media print {
    * {
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        visibility: hidden !important;
    }

    body {
        visibility: visible !important;
        background: #fff !important;
        width: 210mm !important;
        height: 297mm !important;
    }

    #stickerGrid {
        visibility: visible !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-template-rows: repeat(10, 1fr) !important;
        gap: 16px !important;
        background: #fff !important;
        padding: 24px !important;
        margin: 0 !important;
        width: 210mm !important;
        height: 297mm !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        box-sizing: border-box !important;
        page-break-inside: avoid !important;
    }

    #stickerGrid * {
        visibility: visible !important;
    }

    #stickerGrid .name-sticker {
        width: 100% !important;
        height: 100% !important;
        border-radius: 8px !important;
        padding: 6px !important;
        box-shadow: none !important;
        flex-shrink: 0 !important;
        border: 3px solid #3b82f6 !important;
        background: #fff !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    #stickerGrid .sticker-content {
        border: 2px dashed #3b82f6 !important;
        padding: 8px !important;
        gap: 8px !important;
    }

    #stickerGrid .sticker-label {
        padding: 3px 10px !important;
        font-size: 12px !important;
    }

    #stickerGrid .sticker-value {
        font-size: 14px !important;
    }

    #stickerGrid .sticker-blue {
        border-color: #3b82f6 !important;
    }

    #stickerGrid .sticker-blue .sticker-content {
        border-color: #3b82f6 !important;
    }

    #stickerGrid .sticker-blue .sticker-label {
        background: #3b82f6 !important;
    }

    #stickerGrid .sticker-blue .sticker-value {
        border-bottom: 2px solid #3b82f6 !important;
    }

    #stickerGrid .sticker-animal {
        border-color: #f59e0b !important;
    }

    #stickerGrid .sticker-animal .sticker-content {
        border-color: #f59e0b !important;
    }

    #stickerGrid .sticker-animal .sticker-label {
        background: #f59e0b !important;
    }

    #stickerGrid .sticker-animal .sticker-value {
        border-bottom: 2px solid #f59e0b !important;
    }

    #stickerGrid .sticker-plant {
        border-color: #10b981 !important;
    }

    #stickerGrid .sticker-plant .sticker-content {
        border-color: #10b981 !important;
    }

    #stickerGrid .sticker-plant .sticker-label {
        background: #10b981 !important;
    }

    #stickerGrid .sticker-plant .sticker-value {
        border-bottom: 2px solid #10b981 !important;
    }

    #stickerGrid .sticker-space {
        border-color: #8b5cf6 !important;
    }

    #stickerGrid .sticker-space .sticker-content {
        border-color: #8b5cf6 !important;
    }

    #stickerGrid .sticker-space .sticker-label {
        background: #8b5cf6 !important;
    }

    #stickerGrid .sticker-space .sticker-value {
        border-bottom: 2px solid #8b5cf6 !important;
    }
}

@media (max-width: 1024px) {
    .sticker-container {
        grid-template-columns: 1fr;
    }

    .sticker-config {
        order: 2;
    }

    .sticker-preview {
        order: 1;
    }
}

@media (max-width: 768px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sticker-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .sticker-page {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .sticker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}