:root {
    --bg-deep: #1a0b16; 
    --bg-gradient: linear-gradient(135deg, #1a0b16 0%, #2d1b33 50%, #1e1124 100%);
    
    --accent-pink: #ff7eb3;    
    --accent-glow: #ff2d95;     
    --accent-blue: #a29bfe;    
    --glass-bg: rgba(255, 192, 203, 0.05);     
    --text-main: #fce4ec;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

.aurora {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    z-index: -1;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 900px; 
    height: 900px;     
    background: radial-gradient(circle, var(--accent-glow) 0%, var(--accent-pink) 30%, transparent 70%);
    
    border-radius: 50%;
    filter: blur(100px); 
    opacity: 0.35; 
    animation: moveCenter 15s infinite alternate ease-in-out;
}

@keyframes moveCenter {
    from {
        transform: translate(-5%, -5%) scale(1);
    }
    to {
        transform: translate(5%, 5%) scale(1.1);
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}
.logo {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #ff00cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.3s;
}
.nav-links a:hover { color: var(--accent-pink); }

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 10%;
}
.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 200;
    line-height: 1.1;
    margin-bottom: 2rem;
}
.hero h1 span {
    font-family: 'Bodoni Moda', serif;
    font-style: italic;
    color: var(--accent-pink);
    text-shadow: 0 0 20px rgba(255, 0, 204, 0.4);
}
.cta-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: white;
    color: black;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.4s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 10rem;
    text-align: center;
}
.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 0, 204, 0.4);
    background: var(--accent-pink);
    color: white;
}

.section-title {
    text-align: center;
    padding: 5rem 0 2rem;
    font-family: 'Syncopate', sans-serif;
    font-size: 1rem;
    letter-spacing: 5px;
    opacity: 0.6;
}
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 10% 5rem;
}
.card {
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
}
.card:hover { background: rgba(255,255,255,0.1); }
.card h3 { margin-bottom: 1rem; color: #fff; font-size: 1.5rem; }

.template-index-item:hover .template-preview {
    transform: scale(1.1);
}
.template-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 12, 41, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s;
    backdrop-filter: blur(5px);
}
.template-index-item:hover .template-overlay { opacity: 1; }

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem; 
    padding: 2rem 10% 8rem;
    max-width: 1400px; 
    margin: 0 auto;
}

.template-index-item {
    position: relative;
    border-radius: 20px; 
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    aspect-ratio: 4 / 3;
}

.template-index-item .template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    object-position: center; 
}

.template-index-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-pink);
    box-shadow: 0 20px 40px rgba(255, 126, 179, 0.2);
}

.template-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s ease;
}

.template-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem !important;
}

.template-overlay p {
    font-size: 0.7rem !important;
    margin-bottom: 1.5rem !important;
}
@media (max-width: 768px) {
    .nav-links { display: none; }
}

.site-footer {
    padding: 5rem 2rem 4rem;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-main);
    opacity: 0.45;
    position: relative;
}

.site-footer::before {
    content: "";
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--accent-pink),
        transparent
    );
    margin: 0 auto 2rem;
    opacity: 0.4;
}

.row-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* =========================
   Publish Modal
========================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 30px 25px 20px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--accent-pink);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

#retry-payment {
    text-align: center;
}

#retry-payment .error-text {
    color: #ef4444;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

.btn-publish.gray {
    background: #6b7280;
    box-shadow: none;
}

#publish-section {
    display: flex;
    flex-direction: column;
}

.publish-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--text-main);
    width: 100%;
}

.domain-text {
    font-weight: bold;
    color: #fce4ec;
}

.success-text {
    color: #059669;
    font-weight: bold;
    margin-bottom: 15px;
}

#publish-result {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   Buttons
========================= */
.btn-publish,
.btn-signin {
    background: linear-gradient(to right, var(--accent-pink), var(--accent-glow));
    border: none;
    color: white;
    padding: 2px 25px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,45,149,0.3);
    height: 36px;
    font-size: 16px;
    font-weight: 800;
}

.btn-publish:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 0, 204, 0.4);
    background: var(--accent-pink);
    color: white;
}
.btn-signin:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 0, 204, 0.4);
    background: var(--accent-pink);
    color: white;
}
#demo-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#demo-overlay iframe {
  width: 60vw;
  height: 80vh;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#demo-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}
.login-wrapper {
    position: relative; 
    width: 100%;
    height: 100vh; 
    display: flex;
    justify-content: center; 
    align-items: center; 
}

.login-container {
    width: 360px;
    padding: 30px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(255, 45, 149, 0.3);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.8s ease-out;
}

.login-container h2 {
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-pink);
    text-shadow: 0 0 8px var(--accent-glow);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border: 1px solid var(--accent-glow);
    box-shadow: 0 0 12px var(--accent-glow);
    background: rgba(255,255,255,0.1);
}

#login-code {
    text-align: center;
    font-size: 20px;
    letter-spacing: 4px;
    font-weight: bold;
}

.modal-btn {
    width: 100%;
    padding: 12px 0;
    margin-top: 10px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,45,149,0.4);
    transition: all 0.3s ease;
}

.modal-btn:hover {
    box-shadow: 0 6px 20px rgba(255,45,149,0.6);
    transform: translateY(-2px);
}

#login-msg {
    margin-top: 12px;
    font-size: 14px;
    color: #ff6b81; /* 红色提示 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.sub-plan-card {
    display: flex;
    flex-direction: column;  
    justify-content: space-between; 
    background: var(--bg-gradient); 
    backdrop-filter: blur(8px); 
    border-radius: 16px;
    padding: 25px 20px;
    width: 280px;
    box-shadow: 0 8px 20px rgba(255,45,149,0.2);
    color: #fce4ec;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sub-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255,45,149,0.4);
}

.sub-plan-card h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent-pink);
    text-shadow: 0 0 6px var(--accent-glow);
}

.sub-plan-card .price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent-blue);
}

.sub-plan-card .price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-main);
}

.sub-plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sub-plan-card ul li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 15px;
    line-height: 1.5;
}

.sub-plan-card .btn-publish {
    margin-top: auto; 
    padding: 12px 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,45,149,0.4);
    transition: all 0.3s ease;
}

.sub-plan-card .btn-publish:hover {
    box-shadow: 0 6px 20px rgba(255,45,149,0.6);
    transform: translateY(-2px);
}

.card-wrapper {
    display: flex;
    gap: 20px; 
    flex-wrap: wrap;
    justify-content: center;
}


.sub-plan-card.active-plan {
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.6),
        inset 0 -2px 4px rgba(0,0,0,0.05);
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 20, 40, 0.85);
    color: #fce4ec;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(255, 45, 149, 0.35);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.css-icon-camera {
  width: 20px;
  height: 14px;
  border: 2px solid white;
  border-radius: 2px;
  position: relative;
  margin-bottom: 8px;
}
.css-icon-camera::after {
  content: '';
  position: absolute;
  top: -4px; left: 5px;
  width: 6px; height: 3px;
  background: white;
}

#user-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    display: block;
}

.image-overlay {
    position: absolute;
    inset: 0; 
    background: rgba(0, 0, 0, 0.5); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(2px); 
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

.image-size {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.delete-btn {
    background: #ff4d4f;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.delete-btn:hover {
    background: #ff7875;
    transform: scale(1.1);
}

.delete-btn i {
    font-size: 14px;
}

.icon-picker-popover {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 10000;
}

.icon-picker-grid {
    border-radius: 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.icon-option {
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    color: #444;
}

.icon-option:hover {
    background: #f0f0f0;
    color: #007aff;
}

[data-editable][data-type="icon"]:hover {
    outline: 2px dashed #007aff;
    cursor: pointer;
}

.social-edit-panel {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    width: 260px;
    border: 1px solid #eee;
}

.edit-group label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #666;
}

.social-url-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

.img-preview-box {
    width: 100%;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fcfcfc;
    overflow: hidden;
}

.img-preview-box img {
    height: 70px;
    width: 70px;
    object-fit: cover;
}

.img-preview-box span {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.hint {
    font-size: 10px;
    color: #bbb;
    margin-top: 4px;
}

.save-social-btn {
    width: 100%;
    margin-top: 12px;
    background: #007aff;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.popover.link-edit-panel {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 240px;
    z-index: 10002;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95) translateY(-5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.edit-group {
    margin-bottom: 12px;
}

.edit-group label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.link-edit-panel select,
.link-edit-panel input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background-color: #fcfcfc;
    font-size: 14px;
    color: #333;
    box-sizing: border-box; /* 关键：防止宽度溢出 */
    outline: none;
    transition: border-color 0.2s;
}

.link-edit-panel select:focus,
.link-edit-panel input:focus {
    border-color: #007aff;
    background-color: #fff;
}

.save-link-btn {
    width: 100%;
    height: 38px;
    background-color: #007aff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 8px;
}

.save-link-btn:hover {
    background-color: #0056b3;
}

.save-link-btn:active {
    transform: scale(0.98);
}

.link-edit-panel hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 12px 0;
}
[contenteditable]:empty:before {
  content: "Input content...";
  color: #ccc;
  cursor: text;
}

.upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    cursor: pointer;
    z-index: 10;
}

.domain-card {
    background: white; width: 90%; max-width: 500px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.modal-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px;}
.step-title { font-weight: bold; margin-bottom: 10px; color: var(--text-main); margin-top: 10px;}
.dns-info-box { background: var(--text-main); color: var(--bg-deep); padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; }
.dns-table { width: 100%; margin-top: 10px; border-collapse: collapse; text-align: left; }
.dns-table th { font-size: 11px; color: #6b7280; text-transform: uppercase; }
.dns-table code { color: #92400e;  border-radius: 4px; font-family: monospace; }
.wait-notice { display: flex; gap: 12px; background: var(--text-main); color: var(--bg-deep); padding: 15px; border-radius: 8px; font-size: 13px; line-height: 1.4; }

.mini-card {
    max-width: 300px;
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    background: white;
}
#verify-loading i { font-size: 2rem; color: #2563eb; margin-bottom: 15px; }
#verify-result i { font-size: 2.5rem; margin-bottom: 15px; }
.icon-success { color: #10b981; }
.icon-fail { color: #f59e0b; }
.btn-close-mini { 
    margin-top: 20px; padding: 8px 20px; border-radius: 20px; 
    border: 1px solid #ddd; background: #f9fafb; cursor: pointer;
}
.favicon-preview-box {
    position: relative; 
    width: 150px;
    height: 150px;
    border-radius: 8px; 
    overflow: hidden; 
    background: #eee; 
}

.favicon-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.favicon-preview-box:hover .upload-overlay {
    opacity: 1 !important; 
}

.publish-group {
    display: flex;
    flex-direction: column;
    gap: 20px
}

#publish-result{
    color: var(--text-main);
    font-size: medium;
    font-weight: bolder;
}

.site-footer {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}
.footer-links {
    margin-left: 10px;
}
.footer-links a {
    color: #666;
    text-decoration: none;
}
.footer-links a:hover {
    text-decoration: underline;
}
.divider {
    margin: 0 5px;
}