:root {
    --primary: #00f2fe;
    --secondary: #4f5bd5;
    --background: #f8f9fe;
    --text: #2b2c34;
    --surface: rgba(255, 255, 255, 0.95);
    --shadow: 0 8px 32px rgba(0, 146, 254, 0.1);
}

[data-theme="dark"] {
    --primary: #7f5af0;
    --secondary: #2cb67d;
    --background: #16161a;
    --text: #fffffe;
    --surface: rgba(22, 22, 26, 0.95);
    --shadow: 0 8px 32px rgba(108, 92, 231, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    transition: background 0.3s ease;
    overflow: hidden; /* 禁用全局滚动 */
    height: 100vh;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh; /* 替换原height:100vh */
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
    justify-content: space-between; /* 新增关键属性 */
}

.control-bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem;
}

button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text);
    font-size: 1.2rem;
}

.content-wrapper {
    flex: 0 1 auto; /* 替换原flex:1 */
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* 控制内部元素间距 */
}

.quantum-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-field {
    position: relative;
}

.input-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}

.input-field input {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(var(--primary), 0.3);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary), 0.2);
}

.generate-btn {
    position: relative;
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: glowFlow 3s infinite;
}

@keyframes glowFlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow);
    animation: modalSlideUp 0.4s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, -50%); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-body {
    font-size: 1.5rem;
    text-align: center;
    word-break: break-word;
}
.site-footer {
    text-align: center;
    padding: 1rem;
    color: var(--text);
    opacity: 0.8;
    font-size: 0.9rem;
    border-top: 1px solid rgba(var(--primary), 0.1);
    margin-top: 1rem; /* 控制与按钮间距 */
    backdrop-filter: blur(5px);
    background: var(--surface);
    position: sticky;
    bottom: 0;
}
