noscript {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    background-attachment: fixed;
}

noscript .noscript-warning {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

noscript h2 {
    color: #1d1d1f;
    font-size: 24px;
    margin-bottom: 16px;
}

noscript .site-brand {
    font-size: 12px;
    color: #007aff;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

noscript p {
    color: #6e6e73;
    font-size: 16px;
    line-height: 1.6;
}

:root {
    --blue: #007aff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 25px rgba(0,0,0,0.08);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-green: #34c759;
    --accent-red: #ff3b30;
    --bg-start: #e0c3fc;
    --bg-end: #8ec5fc;
}

[data-theme="dark"] {
    --glass: rgba(30, 30, 35, 0.7);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 25px rgba(0,0,0,0.3);
    --text-primary: #f5f5f7;
    --text-secondary: #98989e;
    --bg-start: #1a1a2e;
    --bg-end: #16213e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 85px 20px 40px;
    color: var(--text-primary);
}

.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.top-bar {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 800px;
    height: 56px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 18px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.back-btn:hover {
    transform: scale(1.05);
}

.back-btn:active {
    transform: scale(0.95);
}

.theme-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}

.theme-btn:active {
    transform: scale(0.92);
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
}

.main-card {
    padding: 32px 28px;
    min-height: 400px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 8px;
}

.title-area h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .title-area h1 {
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
}

.title-area p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.divider {
    height: 1px;
    background: rgba(0,0,0,0.1);
    margin: 20px 0;
}

[data-theme="dark"] .divider {
    background: rgba(255,255,255,0.1);
}

.input-section {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.input-section textarea {
    width: 100%;
    height: 150px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    font-family: monospace;
    font-size: 14px;
    color: var(--text-primary);
    resize: vertical;
    transition: all 0.2s;
}

.input-section textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
}

.input-section textarea::placeholder {
    color: var(--text-secondary);
}

[data-theme="dark"] .input-section textarea {
    background: rgba(255,255,255,0.1);
}

.copy-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:active {
    transform: scale(0.95);
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 60px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255,255,255,0.45);
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn.primary {
    background: var(--accent-green);
    color: white;
    border: none;
    box-shadow: 0 2px 12px rgba(52,199,89,0.35);
}

.action-btn.primary:hover {
    background: #2eb853;
}

.output-section {
    margin-bottom: 20px;
}

.output-box {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
}

.output-box.info {
    background: rgba(12,84,96,0.15);
    border-color: rgba(12,84,96,0.2);
    color: var(--text-primary);
}

.output-box.error {
    background: rgba(255,59,48,0.15);
    border-color: rgba(255,59,48,0.2);
    color: var(--accent-red);
}

[data-theme="dark"] .output-box.info {
    background: rgba(12,84,96,0.25);
}

[data-theme="dark"] .output-box.error {
    background: rgba(255,59,48,0.2);
}

.help-section {
    padding: 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.help-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.help-section p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.date-header {
    font-weight: 600;
    color: var(--accent-green);
    margin-top: 15px;
    margin-bottom: 8px;
}

.record {
    padding: 12px;
    margin: 5px 0;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 13px;
}

[data-theme="dark"] .record {
    background: rgba(255,255,255,0.1);
}

.copyright {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .btn-row {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        text-align: center;
    }
}