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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#top {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#top .title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

#top .title-section h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#top .title-section .subtitle {
    color: #a0aec0;
    font-size: 14px;
}

#top .title-section .world-link {
    color: #4fd1c5;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(79, 209, 197, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

#top .title-section .world-link:hover {
    background: rgba(79, 209, 197, 0.2);
    transform: translateY(-2px);
}

#top .right-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

#top .right-section .support-text {
    color: #a0aec0;
    font-size: 13px;
}

#base {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
}

#leftTab {
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.left-tab-wrapper {
    width: 280px;
    display: flex;
    flex-direction: column;
}

.left-tab-wrapper .tab-header {
    font-size: 14px;
    font-weight: 600;
    color: white;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
}

.left-tab-wrapper .tab-header::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #764ba2;
}

.form-horizontal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
}

.controls {
    width: 100%;
}

.controls input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #2d3748;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.controls input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.controls input::placeholder {
    color: #a0aec0;
}

.controls input[type="number"] {
    -moz-appearance: textfield;
}

.controls input[type="number"]::-webkit-inner-spin-button,
.controls input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.colorSelector-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.colorSelector {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid white;
    position: relative;
}

.colorSelector:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.colorSelector div {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.colorSelector::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff' opacity='0.8'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.bootstrap-switch-custom {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-toggle.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.switch-toggle::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.switch-toggle.active::after {
    left: 28px;
}

.switch-label {
    font-size: 13px;
    color: #718096;
}

.switch-toggle.active + .switch-label {
    color: #667eea;
}

#ckArea {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

#ckArea:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

#ckArea::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

#rightTab {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    min-width: 400px;
    min-height: 300px;
}

#container header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 14px;
}

#container header .info-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

#container header .info-text::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #48bb78;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

#container header .download-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

#container header .download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.5);
}

#container #main {
    height: 520px;
    position: relative;
}

.border {
    position: absolute;
    z-index: 9999;
    background: rgba(102, 126, 234, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.border:hover {
    background: rgba(102, 126, 234, 1);
}

#border-top, #border-bottom {
    width: 100%;
    height: 6px;
    cursor: ns-resize;
}

#border-right, #border-left {
    width: 6px;
    height: 100%;
    cursor: ew-resize;
}

#border-right-top, #border-right-bottom, #border-left-bottom, #border-left-top {
    width: 14px;
    height: 14px;
    background: rgba(102, 126, 234, 0.8);
    border-radius: 4px;
}

#border-top, #border-left-top {
    top: 0;
    left: 0;
}

#border-right, #border-right-top {
    top: 0;
    right: 0;
}

#border-bottom, #border-left-bottom {
    left: 0;
    bottom: 0;
}

#border-left {
    top: 0;
    left: 0;
}

#border-right-bottom {
    right: 0;
    bottom: 0;
}

#border-left-top, #border-right-bottom {
    cursor: nwse-resize;
}

#border-right-top, #border-left-bottom {
    cursor: nesw-resize;
}

.image {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
}

.image .notes {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.8;
}

.image .notes .highlight {
    color: #e53e3e;
    font-weight: 600;
}

.image .notes a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.image .notes a:hover {
    border-bottom-color: #667eea;
}

.dashang {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashang:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.dashang::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hide_box {
    z-index: 999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: fixed;
    display: none;
}

.shang_box {
    width: 420px;
    background: white;
    border-radius: 20px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    overflow: hidden;
}

.shang_close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shang_close:hover {
    background: #edf2f7;
    transform: rotate(90deg);
}

.shang_tit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 24px;
    text-align: center;
    color: white;
}

.shang_tit p {
    font-size: 16px;
    font-weight: 600;
}

.shang_payimg {
    padding: 24px;
    text-align: center;
}

.shang_payimg img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pay_explain {
    text-align: center;
    color: #718096;
    font-size: 14px;
    padding: 0 24px;
}

.shang_payselect {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 24px;
}

.pay_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.pay_item.checked {
    opacity: 1;
}

.pay_item .pay_logo img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pay_item.checked .pay_logo img {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.shang_info {
    padding: 0 24px 24px;
    text-align: center;
}

.shang_info p {
    color: #a0aec0;
    font-size: 13px;
}

.shang_info #shang_pay_txt {
    color: #667eea;
    font-weight: 600;
}

@media (max-width: 1024px) {
    #base {
        flex-direction: column;
    }
    
    #leftTab {
        width: 100%;
        max-height: 400px;
    }
    
    #rightTab {
        width: 100%;
    }
    
    #container #main {
        height: 400px;
    }
}