* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f5f7fa;
    padding: 20px;
    color: #333;
}

/* 密码保护界面 */
.password-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.password-container h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.password-container p {
    color: #7f8c8d;
    margin-bottom: 30px;
    text-align: center;
}

.password-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
    transition: all 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.password-btn {
    width: 100%;
    padding: 14px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.password-btn:hover {
    background-color: #27ae60;
}

.password-error {
    color: #e74c3c;
    margin-top: 15px;
    text-align: center;
    display: none;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 1200px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    display: none;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.single-input-section, .batch-input-section {
    flex: 1;
    min-width: 300px;
}

.section-title {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "✏️";
    margin-right: 10px;
}

.shape-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.shape-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circle {
    width: 60mm;
    height: 60mm;
    border: 3px solid #000000;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.square {
    width: 60mm;
    height: 60mm;
    border: 3px solid #000000;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.input-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* 布局样式 */
.layout-single {
    height: 100%;
    justify-content: center;
}

.layout-double-top {
    height: 50%;
    justify-content: center;
    align-items: flex-start;
}

.layout-double-bottom {
    height: 50%;
    justify-content: center;
    align-items: flex-end;
}

.layout-triple-top {
    height: 33.33%;
    justify-content: center;
    align-items: flex-start;
}

.layout-triple-middle {
    height: 33.33%;
    justify-content: center;
    align-items: center;
}

.layout-triple-bottom {
    height: 33.33%;
    justify-content: center;
    align-items: flex-end;
}

.shape-input {
    width: 95%;
    padding: 5px 8px;
    border: none;
    border-radius: 6px;
    font-size: 45px;
    text-align: center;
    transition: all 0.3s;
    background-color: transparent;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    font-weight: bold;
    line-height: 1.2;
    height: auto;
    color: #000000;
}

.shape-input:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
    background-color: rgba(0, 0, 0, 0.05);
}

.shape-input::placeholder {
    font-size: 14px;
    color: #aaa;
    font-weight: normal;
}

/* 保留选择复选框样式 */
.retain-checkboxes {
    display: flex;
    justify-content: space-between;
    width: 60mm;
    margin-top: 15px;
    padding: 0 10px;
}

.retain-checkbox-group {
    display: flex;
    align-items: center;
}

.retain-checkbox {
    margin-right: 8px;
    transform: scale(1.2);
    cursor: pointer;
}

.retain-checkbox-label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.batch-input-area {
    width: 100%;
    padding: 15px;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

.batch-textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.batch-textarea:focus {
    outline: 2px solid #3498db;
    border-color: #3498db;
}

.batch-instructions {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 10px;
    line-height: 1.5;
}

.batch-instructions code {
    background-color: #eef2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.batch-data-preview {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 10px;
    background-color: #f8f9fa;
    font-size: 13px;
}

.batch-data-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.batch-data-item:last-child {
    border-bottom: none;
}

.batch-data-index {
    font-weight: bold;
    color: #3498db;
    margin-right: 10px;
}

.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.btn-print {
    background-color: #000000;
    color: white;
}

.btn-print:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

.btn-batch-print {
    background-color: #2c3e50;
    color: white;
}

.btn-batch-print:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-image {
    background-color: #9b59b6;
    color: white;
}

.btn-image:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
}

.btn-batch-image {
    background-color: #16a085;
    color: white;
}

.btn-batch-image:hover {
    background-color: #138d75;
    transform: translateY(-2px);
}

.btn::before {
    margin-right: 8px;
    font-size: 18px;
}

.btn-print::before {
    content: "🖨️";
}

.btn-batch-print::before {
    content: "📋";
}

.btn-image::before {
    content: "🖼️";
}

.btn-batch-image::before {
    content: "🖼️📦";
}

/* 新增：模板管理按钮 */
.btn-template {
    background-color: #f39c12;
    color: white;
}

.btn-template:hover {
    background-color: #d68910;
    transform: translateY(-2px);
}

.btn-template::before {
    content: "📁";
}

/* 形状设置区域 */
.shape-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #9b59b6;
}

.shape-settings h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.shape-settings h3::before {
    content: "🔵";
    margin-right: 10px;
}

.shape-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.shape-option {
    padding: 10px 20px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.shape-option:hover {
    border-color: #3498db;
}

.shape-option.active {
    border-color: #9b59b6;
    background-color: #f0e6f5;
}

.shape-option::before {
    margin-right: 8px;
    font-size: 18px;
}

.shape-option-circle::before {
    content: "⚪";
}

.shape-option-square::before {
    content: "⬜";
}

.size-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.size-setting-group {
    display: flex;
    flex-direction: column;
}

.size-setting-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.size-setting-label::before {
    margin-right: 8px;
}

.circle-size-label::before {
    content: "📏";
}

.square-width-label::before {
    content: "↔️";
}

.square-height-label::before {
    content: "↕️";
}

.size-input-container {
    display: flex;
    align-items: center;
}

.size-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.size-unit {
    margin-left: 8px;
    font-weight: 600;
    color: #7f8c8d;
    min-width: 30px;
}

.size-hint {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 打印设置区域 */
.print-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #000000;
}

.print-settings h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.print-settings h3::before {
    content: "⚙️";
    margin-right: 10px;
}

.setting-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.setting-label {
    width: 180px;
    font-weight: 600;
    color: #2c3e50;
}

.setting-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.setting-unit {
    margin-left: 8px;
    color: #7f8c8d;
}

.setting-hint {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
    width: 100%;
}

/* 字体设置区域 */
.font-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #3498db;
}

.font-settings h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.font-settings h3::before {
    content: "🔤";
    margin-right: 10px;
}

.font-setting-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.font-setting-label {
    width: 180px;
    font-weight: 600;
    color: #2c3e50;
}

.font-range-input {
    width: 300px;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

.font-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.font-range-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.font-size-value {
    width: 60px;
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    margin-left: 15px;
}

.font-preview {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 15px;
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    font-weight: bold;
}

/* 密码管理区域 */
.password-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #3498db;
}

.password-settings h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.password-settings h3::before {
    content: "🔒";
    margin-right: 10px;
}

.password-setting-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.password-setting-label {
    width: 180px;
    font-weight: 600;
    color: #2c3e50;
}

.password-setting-input {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
}

.password-setting-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
}

.password-setting-btn:hover {
    background-color: #2980b9;
}

.password-setting-hint {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
    width: 100%;
}

/* 模板管理区域 */
.template-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #f39c12;
    display: none;
}

.template-settings h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.template-settings h3::before {
    content: "📁";
    margin-right: 10px;
}

.template-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.template-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
}

.template-btn {
    padding: 8px 16px;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.template-btn:hover {
    background-color: #d68910;
}

.template-btn-small {
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 5px;
}

.templates-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 10px;
    background-color: white;
}

.template-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-item:last-child {
    border-bottom: none;
}

.template-name {
    font-weight: 600;
    color: #2c3e50;
}

.template-date {
    font-size: 12px;
    color: #7f8c8d;
}

.template-actions {
    display: flex;
    gap: 5px;
}

/* 日志管理区域 */
.log-settings {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #e74c3c;
    display: none;
}

.log-settings h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.log-settings h3::before {
    content: "📊";
    margin-right: 10px;
}

.log-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.log-btn {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.log-btn:hover {
    background-color: #c0392b;
}

.logs-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 10px;
    background-color: white;
    font-size: 12px;
}

.log-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    font-weight: bold;
    color: #e74c3c;
}

.log-content {
    margin-top: 4px;
    color: #555;
}

.specifications {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #000000;
}

.specifications h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.specifications h3::before {
    content: "📋";
    margin-right: 10px;
}

.specifications ul {
    list-style-type: none;
    padding-left: 5px;
}

.specifications li {
    padding: 5px 0;
    color: #555;
}

.specifications li::before {
    content: "✓";
    color: #2ecc71;
    font-weight: bold;
    margin-right: 10px;
}

.instructions {
    margin-top: 30px;
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
    line-height: 1.6;
}

/* 图片预览区域 */
.image-preview {
    display: none;
    margin-top: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9f9f9;
}

.image-preview h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview h3::before {
    content: "👁️";
    margin-right: 10px;
}

#generated-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.download-btn {
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.download-btn:hover {
    background-color: #27ae60;
}

.download-btn::before {
    content: "💾";
    margin-right: 8px;
}

/* 批量打印预览区域 */
.batch-print-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.batch-print-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 95%;
    margin: 0 auto;
    position: relative;
}

.close-preview {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
}

.close-preview:hover {
    color: #e74c3c;
}

.batch-preview-title {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.batch-preview-circles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
    justify-items: center;
}

.preview-shape-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.preview-shape-index {
    font-weight: bold;
    color: #3498db;
    margin-bottom: 8px;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.preview-shape {
    border: 2px solid #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-circle {
    border-radius: 50%;
}

.preview-square {
    border-radius: 0;
}

.preview-input-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.preview-input {
    width: 90%;
    padding: 3px;
    border: none;
    background-color: transparent;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    font-weight: bold;
    color: #000000;
}

.batch-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* 高级设置按钮 */
.advanced-settings-toggle {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 15px;
}

.toggle-btn {
    padding: 10px 20px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background-color: #7f8c8d;
}

.toggle-btn.active {
    background-color: #3498db;
}

/* 打印样式 */
@media print {
    body * {
        visibility: hidden !important;
    }
    
    #print-container, #print-container * {
        visibility: visible !important;
    }
    
    #print-container {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .print-shape {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        background-color: white !important;
        box-shadow: none !important;
        position: absolute !important;
        border: 3px solid #000000 !important;
    }
    
    .print-circle {
        border-radius: 50% !important;
    }
    
    .print-square {
        border-radius: 0 !important;
    }
    
    .print-input-group {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    .print-input {
        width: 95% !important;
        padding: 3px 5px !important;
        border: none !important;
        border-radius: 6px !important;
        text-align: center !important;
        background-color: transparent !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        max-width: 100% !important;
        font-weight: bold !important;
        line-height: 1.2 !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    @page {
        margin: 0 !important;
        size: auto !important;
    }
    
    .no-print, .container, .header, .content-wrapper, .print-settings, 
    .specifications, .instructions, .image-preview, .batch-print-preview,
    .buttons-container, .password-container, .font-settings, .password-settings,
    .shape-settings, .template-settings, .log-settings {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 768px) {
    .shape-options {
        flex-direction: column;
    }
    
    .size-settings {
        grid-template-columns: 1fr;
    }
    
    .circle, .square {
        width: 45mm;
        height: 45mm;
    }
    
    .retain-checkboxes {
        width: 45mm;
    }
    
    .shape-input {
        font-size: 18px;
    }
    
    .btn {
        min-width: 150px;
        padding: 12px 20px;
    }
    
    .buttons-container {
        gap: 10px;
    }
    
    .setting-group, .password-setting-group, .font-setting-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-label, .password-setting-label, .font-setting-label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .font-range-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .font-size-value {
        margin-left: 0;
        width: 100%;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .batch-preview-circles {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .password-setting-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .password-setting-btn {
        margin-left: 0;
        width: 100%;
    }
    
    .batch-print-content {
        max-width: 98%;
        padding: 20px;
    }
    
    .template-controls {
        flex-direction: column;
    }
    
    .template-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .circle, .square {
        width: 40mm;
        height: 40mm;
    }
    
    .retain-checkboxes {
        width: 40mm;
    }
    
    .shape-input {
        font-size: 16px;
        padding: 4px 6px;
    }
    
    .retain-checkbox-label {
        font-size: 12px;
    }
    
    .buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .batch-preview-circles {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}