.ip-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ip-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.ip-section h3 {
    font-size: 0.95em;
    color: #2c3e50;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-section h3 i {
    color: #3498db;
}

/* 上传区 */
.ip-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.ip-upload:hover,
.ip-upload.dragover {
    border-color: #3498db;
    background: #f0f7ff;
}

.ip-upload i {
    font-size: 1.8em;
    color: #3498db;
    margin-bottom: 8px;
}

.ip-upload p {
    color: #666;
    font-size: 0.85em;
    margin: 0;
}

.ip-preview-thumb {
    position: relative;
    margin-top: 10px;
    text-align: center;
}

.ip-preview-thumb img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.ip-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    padding: 0;
}

/* 分割模式 */
.ip-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ip-mode-btn {
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    padding: 12px 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ip-mode-btn:hover {
    border-color: #3498db;
}

.ip-mode-btn.active {
    border-color: #3498db;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(52,152,219,0.15);
}

.mode-icon {
    font-size: 1.3em;
    color: #3498db;
}

.mode-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #333;
}

.mode-desc {
    font-size: 0.7em;
    color: #999;
}

/* 表单 */
.ip-form-row {
    margin-bottom: 12px;
}

.ip-form-row label {
    display: block;
    font-size: 0.85em;
    color: #555;
    margin-bottom: 5px;
}

.ip-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
}

.ip-form-row input[type="range"] {
    width: 100%;
}

.ip-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
}

.ip-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* 按钮 */
.ip-actions {
    display: flex;
    gap: 8px;
}

.ip-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ip-btn-primary {
    background: #3498db;
    color: #fff;
}

.ip-btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.ip-btn-success {
    background: #27ae60;
    color: #fff;
}

.ip-btn-success:hover:not(:disabled) {
    background: #219a52;
}

.ip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ip-btn-vip {
    background: #f39c12;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    margin-top: 8px;
}

/* 使用次数信息 */
.ip-usage-info {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85em;
    color: #2c3e50;
    text-align: center;
}

.ip-usage-info i {
    color: #3498db;
    margin-right: 4px;
}

/* VIP提示 */
.ip-vip-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.ip-vip-notice i {
    font-size: 1.4em;
    color: #f39c12;
    margin-bottom: 6px;
}

.ip-vip-notice p {
    color: #856404;
    font-size: 0.85em;
    margin-bottom: 8px;
}

/* 权限遮罩 */
.ip-vip-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(0,0,0,0.75);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    backdrop-filter: blur(2px);
}

.ip-vip-mask-inner {
    text-align: center;
    color: #fff;
    padding: 30px;
}

.ip-vip-mask-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.ip-vip-mask-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 8px;
}

.ip-vip-mask-desc {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 20px;
}

.ip-vip-mask-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ip-vip-btn {
    background: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ip-vip-btn:hover {
    background: #2980b9;
}

.ip-vip-btn-single {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.ip-vip-btn-single:hover {
    background: #c0392b;
}

/* 主区域 */
.ip-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.ip-canvas-container {
    width: 100%;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    padding: 20px;
}

.ip-placeholder {
    text-align: center;
    color: #999;
}

.ip-placeholder i {
    font-size: 3em;
    margin-bottom: 12px;
    color: #bdc3c7;
}

.ip-placeholder p {
    margin: 0;
}

.ip-canvas-container canvas {
    max-width: 100%;
    max-height: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 结果网格 */
.ip-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.ip-result-item {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.ip-result-item:hover {
    transform: translateY(-2px);
}

.ip-result-item img {
    width: 100%;
    height: auto;
    display: block;
}

.ip-result-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 4px;
}

.ip-result-dl {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ip-result-dl:hover {
    opacity: 1;
}

.ip-result-dl:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 使用提示 */
.ip-tips {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.ip-tips h4 {
    font-size: 1em;
    color: #2c3e50;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-tips h4 i {
    color: #f39c12;
}

.ip-tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ip-tip-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #3498db;
}

.ip-tip-item strong {
    display: block;
    font-size: 0.9em;
    color: #2c3e50;
    margin-bottom: 4px;
}

.ip-tip-item p {
    font-size: 0.8em;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* 响应式 */
@media (max-width: 768px) {
    .ip-container {
        grid-template-columns: 1fr;
    }
    .ip-tip-grid {
        grid-template-columns: 1fr;
    }
    .ip-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ip-result-grid {
        grid-template-columns: 1fr;
    }
    .ip-mode-grid {
        grid-template-columns: 1fr;
    }
}
