* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    background: #2a2a2a;
    padding: 12px 20px;
    gap: 8px;
    border-bottom: 1px solid #444;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #333;
    color: #fff;
}

.tab-btn.active {
    background: #fe2c55;
    color: #fff;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* App Container */
.app-container {
    display: flex;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Controls Panel */
.controls {
    background: #2a2a2a;
    padding: 24px;
    border-radius: 12px;
    width: 350px;
    flex-shrink: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.controls h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.control-group {
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group input[type="text"],
.control-group input[type="number"],
.control-group textarea,
.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-size: 14px;
}

.control-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #444;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.control-group input[type="file"]:hover {
    border-color: #fe2c55;
}

.control-group input[type="range"] {
    width: 100%;
    margin-top: 4px;
}

.control-group textarea {
    resize: vertical;
    min-height: 80px;
}

.control-group input:focus,
.control-group textarea:focus {
    outline: none;
    border-color: #fe2c55;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input,
.input-with-btn textarea {
    flex: 1;
}

/* Buttons */
.btn {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    margin-top: 8px;
}

.btn-primary {
    background: #fe2c55;
    color: #fff;
}

.btn-primary:hover {
    background: #e6284d;
}

.btn-secondary {
    background: #444;
    color: #fff;
}

.btn-secondary:hover {
    background: #555;
}

.btn-accent {
    background: #25f4ee;
    color: #000;
}

.btn-accent:hover {
    background: #1ad4cf;
}

.btn-icon {
    padding: 10px 12px;
    font-size: 16px;
}

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

.btn-group .btn {
    flex: 1;
}

.divider {
    height: 1px;
    background: #444;
    margin: 20px 0;
}

.section-title {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* Preview Area */
.preview-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

.preview-label {
    color: #666;
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
}

/* Popup Card */
.popup-container {
    position: relative;
}

.popup-card {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 28px 24px 20px;
    width: 280px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.tiktok-logo {
    width: 32px;
    height: 32px;
    margin: 0 auto 16px;
}

.tiktok-logo svg {
    width: 100%;
    height: 100%;
}

.popup-title {
    font-size: 18px;
    font-weight: 700;
    color: #161823;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.2px;
}

.popup-description {
    font-size: 13px;
    color: #5c5c5c;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
}

.popup-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0 -24px;
}

.popup-accept {
    padding-top: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #161823;
    cursor: pointer;
}

/* Checkout Preview */
.checkout-preview-container {
    position: relative;
}

.checkout-preview {
    width: 360px;
    height: 640px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-placeholder {
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.checkout-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.checkout-popup-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.checkout-popup-overlay .popup-card {
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

/* Background Status */
.bg-status {
    background: #333;
    padding: 12px;
    border-radius: 8px;
    color: #25f4ee;
    font-size: 13px;
    margin-bottom: 8px;
}

.bg-status.error {
    color: #fe2c55;
}

/* Scale Value Display */
#scale-value {
    color: #888;
    font-size: 12px;
    margin-left: 8px;
}
