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

body {
    font-family: 'Orbitron', 'Segoe UI', monospace, sans-serif;
    background:
        radial-gradient(circle at 20% 80%, #120458 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #421a78 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, #1a0b3d 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #00ffff;
    overflow-x: hidden;
    position: relative;
}

/* 科技背景动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 98px,
            rgba(0, 255, 255, 0.03) 100px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 98px,
            rgba(0, 255, 255, 0.03) 100px
        );
    pointer-events: none;
    z-index: 1;
}

/* 动态粒子效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #00ffff, transparent),
        radial-gradient(2px 2px at 40px 70px, #ff00ff, transparent),
        radial-gradient(1px 1px at 90px 40px, #00ff00, transparent),
        radial-gradient(1px 1px at 130px 80px, #ffff00, transparent),
        radial-gradient(2px 2px at 160px 30px, #ff0080, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

@keyframes sparkle {
    from { transform: translateY(0px); }
    to { transform: translateY(-100px); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #00ffff;
    position: relative;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow:
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 80px #00ffff;
    animation: glow-pulse 2s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

@keyframes glow-pulse {
    from {
        text-shadow:
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 80px #00ffff;
    }
    to {
        text-shadow:
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 80px #00ffff,
            0 0 120px #00ffff;
    }
}

header p {
    font-size: 1.2em;
    color: #80ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    font-weight: 300;
    letter-spacing: 1px;
}

main {
    flex: 1;
    background:
        linear-gradient(145deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    padding: 35px;
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 10px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* 主容器发光边框动画 */
main::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    /* 深邃星空渐变 */
    background: linear-gradient(45deg, #2c3e50, #4ca1af);
    border-radius: 22px;
    z-index: -1;
    animation: border-glow 3s linear infinite;
    opacity: 0.6;
}

@keyframes border-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 18px;
    border: none;
    background: transparent;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.4s ease;
    border-bottom: 3px solid transparent;
    color: #80ffff;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn.active {
    color: #00ffff;
    border-bottom-color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

.tab-btn:hover {
    background: rgba(0, 255, 255, 0.05);
    color: #00ffff;
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    margin-bottom: 35px;
    animation: fadeIn 0.5s ease-in-out;
}

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

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

.file-upload {
    text-align: center;
    padding: 50px 25px;
}

#htmlFile {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 40px 50px;
    border: 3px dashed #00ffff;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s ease;
    background:
        linear-gradient(145deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.file-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.file-label:hover {
    border-color: #ff00ff;
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(0, 255, 255, 0.3),
        0 0 50px rgba(255, 0, 255, 0.2);
}

.file-label:hover::before {
    opacity: 0.1;
}

.file-icon {
    font-size: 4em;
    display: block;
    margin-bottom: 15px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.file-text {
    font-size: 1.3em;
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    letter-spacing: 1px;
}

#htmlCode {
    width: 100%;
    height: 320px;
    padding: 25px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: all 0.4s ease;
    background:
        linear-gradient(145deg, rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.8));
    color: #00ffff;
    backdrop-filter: blur(5px);
}

#htmlCode:focus {
    outline: none;
    border-color: #ff00ff;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(255, 0, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    background:
        linear-gradient(145deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.9));
}

#htmlCode::placeholder {
    color: rgba(128, 255, 255, 0.6);
}

.generate-btn {
    width: 100%;
    padding: 18px;
    font-size: 1.3em;
    font-weight: bold;
    color: #000;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #00ff00, #ffff00);
    background-size: 300% 300%;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.generate-btn:hover:not(:disabled)::before {
    left: 100%;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(0, 255, 255, 0.4),
        0 0 50px rgba(255, 0, 255, 0.3);
}

.generate-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(45deg, #333, #555);
    animation: none;
}

.result-section {
    text-align: center;
    padding: 35px;
    background:
        linear-gradient(145deg, rgba(0, 255, 0, 0.1), rgba(0, 255, 255, 0.1));
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 15px;
    margin-top: 25px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.result-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle, rgba(0, 255, 0, 0.1) 0%, transparent 70%);
    animation: success-pulse 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes success-pulse {
    0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

.result-section h3 {
    color: #00ff00;
    margin-bottom: 25px;
    font-size: 1.6em;
    text-shadow: 0 0 15px #00ff00;
    animation: success-glow 2s ease-in-out infinite alternate;
}

@keyframes success-glow {
    from { text-shadow: 0 0 15px #00ff00; }
    to { text-shadow: 0 0 25px #00ff00, 0 0 35px #00ff00; }
}

.link-container {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

#previewLink {
    flex: 1;
    padding: 15px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    font-size: 14px;
    background:
        linear-gradient(145deg, rgba(26, 26, 46, 0.8), rgba(22, 33, 62, 0.8));
    color: #00ffff;
    font-family: 'Fira Code', monospace;
    backdrop-filter: blur(5px);
}

.copy-btn {
    padding: 15px 25px;
    background: linear-gradient(45deg, #00ffff, #0080ff);
    color: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:hover {
    background: linear-gradient(45deg, #0080ff, #00ffff);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.4);
}

.link-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.open-btn, .new-btn {
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.open-btn {
    background: linear-gradient(45deg, #00ff00, #00ff80);
    color: #000;
    border: 1px solid rgba(0, 255, 0, 0.5);
}

.open-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.open-btn:hover::before {
    left: 100%;
}

.open-btn:hover {
    background: linear-gradient(45deg, #00ff80, #00ff00);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 0, 0.4);
}

.new-btn {
    background: linear-gradient(45deg, #ff0080, #ff00ff);
    color: #fff;
    border: 1px solid rgba(255, 0, 128, 0.5);
    cursor: pointer;
}

.new-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.new-btn:hover::before {
    left: 100%;
}

.new-btn:hover {
    background: linear-gradient(45deg, #ff00ff, #ff0080);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 255, 0.4);
}

.expire-info {
    color: #80ffff;
    font-size: 1em;
    text-shadow: 0 0 10px rgba(128, 255, 255, 0.5);
    font-weight: 300;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #00ffff;
}

.loading p {
    color: #80ffff;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(128, 255, 255, 0.5);
    margin-top: 20px;
    animation: loading-text 2s ease-in-out infinite;
}

@keyframes loading-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 255, 0.2);
    border-top: 4px solid #00ffff;
    border-right: 4px solid #ff00ff;
    border-bottom: 4px solid #00ff00;
    border-left: 4px solid #ffff00;
    border-radius: 50%;
    animation: cyber-spin 1.5s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

.spinner::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid transparent;
    border-top: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 50%;
    animation: cyber-spin 2s linear infinite reverse;
}

@keyframes cyber-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #80ffff;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(128, 255, 255, 0.3);
    position: relative;
}

footer::before {
    content: '⚡';
    margin-right: 10px;
    animation: electric 2s ease-in-out infinite;
}

footer::after {
    content: '⚡';
    margin-left: 10px;
    animation: electric 2s ease-in-out infinite 1s;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2.2em;
    }

    main {
        padding: 25px;
    }

    .link-container {
        flex-direction: column;
        gap: 15px;
    }

    .link-actions {
        flex-direction: column;
        gap: 15px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: none;
        border-right: 3px solid transparent;
    }

    .tab-btn.active {
        border-right-color: #00ffff;
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    main {
        padding: 20px;
    }

    .file-label {
        padding: 30px 25px;
    }

    .file-icon {
        font-size: 3em;
    }

    .generate-btn {
        font-size: 1.1em;
        padding: 15px;
    }
}

/* 额外的科技效果 */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 鼠标悬停时的粒子效果 */
.particle-effect {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float 2s ease-out forwards;
}

@keyframes particle-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border-radius: 6px;
    border: 2px solid rgba(26, 26, 46, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
}

/* 选中文本的样式 */
::selection {
    background: rgba(0, 255, 255, 0.3);
    color: #00ffff;
}

::-moz-selection {
    background: rgba(0, 255, 255, 0.3);
    color: #00ffff;
}