.glass-panel,
.nav-glass {
    background: var(--surface);
    box-shadow: var(--shadow)
}

.glass-panel,
.nav-glass,
.nav-links-mobile {
    box-shadow: var(--shadow)
}

.hero h1,
.logo {
    font-weight: 800
}

.hero h2,
.hero p {
    color: var(--text-muted)
}

.btn-secondary:hover,
.chip:hover,
.theme-toggle:hover {
    background: var(--border)
}

.btn,
.chip,
.faq-question,
.history-card,
.history-copy-btn,
.slider,
.theme-toggle,
.toggle-row {
    cursor: pointer
}

.faq-section h2,
.hero,
.mobile-nav-link,
footer {
    text-align: center
}

.footer-links a,
.logo,
.mobile-nav-link,
.nav-link {
    text-decoration: none
}

:root {
    --bg-color: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    --surface: rgba(255, 255, 255, 0.7);
    --surface-solid: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --border: rgba(148, 163, 184, 0.2);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1)
}

.glass-panel,
.hamburger-bar,
.nav-link,
.theme-toggle,
body {
    transition: var(--transition)
}

[data-theme=dark] {
    --bg-color: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --surface: rgba(30, 41, 59, 0.6);
    --surface-solid: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --accent: #34d399;
    --border: rgba(248, 250, 252, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3)
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6
}

.glass-panel {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem
}

nav {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem
}

.nav-glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 100px;
    padding: .75rem 1.5rem;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    width: 100%;
    position: relative
}

.logo,
.theme-toggle {
    display: flex;
    align-items: center;
    color: var(--text-main)
}

.logo {
    font-size: 1.2rem;
    gap: .5rem
}

.chip,
.nav-link {
    font-weight: 500
}

.theme-toggle {
    background: 0 0;
    border: none;
    padding: .5rem;
    border-radius: 50%;
    justify-content: center
}

.hidden {
    display: none !important
}

.nav-links-pc {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    margin-right: 1.5rem
}

.nav-link {
    color: var(--text-main);
    font-size: .95rem;
    padding: .5rem 1rem;
    border-radius: 20px
}

.mobile-nav-link.active,
.mobile-nav-link:hover,
.nav-link.active,
.nav-link:hover {
    color: var(--primary);
    background: var(--border)
}

.hamburger-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: 0 0;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px
}

.hamburger-toggle.active .hamburger-bar:first-child {
    transform: translateY(8px) rotate(45deg)
}

.hamburger-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0
}

.hamburger-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg)
}

.nav-links-mobile {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 99;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .3s, transform .3s;
    pointer-events: none
}

.chip,
.main-input {
    background: var(--surface-solid)
}

.chip,
.main-input,
.mobile-nav-link {
    transition: var(--transition)
}

.nav-links-mobile.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto
}

.mobile-nav-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.05rem;
    padding: .75rem 1.5rem;
    width: 100%;
    border-radius: 12px
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem
}

.hero {
    margin: 3rem 0
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--primary) 0, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .5rem
}

.hero h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem
}

.hero p {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto
}

.chip,
.input-group label,
.live-indicator,
.main-input,
.toggle-label {
    color: var(--text-main)
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem
}

.input-group {
    margin-bottom: 1.75rem
}

.input-group label {
    display: block;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: .5rem
}

.main-input {
    width: 100%;
    min-height: 80px;
    padding: .75rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical
}

.main-input:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15)
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem
}

.chip {
    padding: .5rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: .85rem
}

.chip:hover {
    transform: translateY(-1px)
}

.chip.active {
    background: linear-gradient(135deg, var(--primary) 0, var(--accent) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(59, 130, 246, .2)
}

.options-group {
    background: rgba(0, 0, 0, .02);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem
}

[data-theme=dark] .options-group {
    background: rgba(255, 255, 255, .02)
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem
}

.toggle-row:last-child {
    margin-bottom: 0
}

.toggle-label {
    font-weight: 600;
    font-size: .9rem
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px
}

.slider,
.slider:before {
    position: absolute;
    transition: var(--transition)
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    border-radius: 34px
}

.pulse,
input:checked+.slider {
    background-color: var(--accent)
}

.slider:before {
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%
}

input:checked+.slider:before {
    transform: translateX(20px)
}

.output-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 600
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .7);
    animation: 1.6s infinite pulse
}

@keyframes pulse {
    0% {
        transform: scale(.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, .7)
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0)
    }

    100% {
        transform: scale(.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0)
    }
}

.stats {
    display: flex;
    gap: 1rem
}

.stat-item {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--border);
    padding: .25rem .75rem;
    border-radius: 8px
}

.output-textarea {
    flex: 1;
    width: 100%;
    min-height: 350px;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #020617;
    color: #f8fafc;
    font-family: 'Courier New', Courier, monospace;
    font-size: .95rem;
    line-height: 1.5;
    resize: none;
    transition: var(--transition)
}

[data-theme=dark] .output-textarea {
    background: #020617;
    color: #e2e8f0
}

.btn-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: .75rem;
    margin-top: 1rem
}

.btn,
.history-title {
    display: flex;
    gap: .5rem
}

.btn {
    padding: .85rem 1.25rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: .95rem;
    border: 1px solid transparent;
    align-items: center;
    justify-content: center;
    transition: var(--transition)
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, .15)
}

.btn-secondary,
footer {
    background: var(--surface-solid)
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, .25)
}

.btn-secondary {
    border-color: var(--border);
    color: var(--text-main)
}

.article-sec,
.history-card {
    border: 1px solid var(--glass-border)
}

.history-section {
    margin-top: 3rem;
    margin-bottom: 2rem
}

.history-title {
    font-size: 1.25rem;
    font-weight: 800;
    align-items: center;
    margin-bottom: 1.25rem
}

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem
}

.history-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition)
}

.history-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary)
}

.history-text {
    font-size: .85rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .5rem;
    font-family: monospace
}

.article-sec p,
.history-meta,
.info-card li p,
.info-card>p {
    color: var(--text-muted)
}

.article-sec,
.content-grid,
.faq-section {
    margin: 4rem 0
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem
}

.footer-links a:hover,
.history-copy-btn {
    color: var(--primary)
}

.history-copy-btn {
    border: none;
    background: 0 0;
    font-weight: 600
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem
}

.info-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem
}

.info-card>p {
    margin-bottom: 1.5rem
}

.info-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem
}

.info-card li {
    display: flex;
    gap: 1rem;
    align-items: flex-start
}

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0
}

.article-sec,
.faq-item {
    background: var(--surface)
}

.info-card li strong {
    display: block;
    font-size: .95rem;
    margin-bottom: .15rem
}

.info-card li p {
    font-size: .85rem
}

.article-sec {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: 2.5rem
}

.article-sec h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem
}

.article-sec h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: .75rem
}

.article-sec p {
    margin-bottom: 1.25rem
}

.article-sec hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0
}

.article-sec ol,
.article-sec ul {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: var(--text-muted)
}

.article-sec li {
    margin-bottom: .5rem
}

.faq-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem
}

.faq-item {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition)
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: 0 0;
    border: none;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.copyright,
footer {
    border-top: 1px solid var(--border)
}

.faq-question:after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: var(--transition)
}

.faq-item.active .faq-question:after {
    content: "−";
    transform: rotate(180deg)
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease-out
}

.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.6
}

footer {
    padding: 4rem 1.5rem 2rem;
    border-radius: var(--radius) var(--radius) 0 0
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main)
}

.copyright,
.footer-desc {
    color: var(--text-muted)
}

.footer-desc {
    max-width: 400px;
    margin: 0 auto 2rem
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem
}

.footer-links a {
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition)
}

.copyright {
    font-size: .9rem;
    padding-top: 2rem
}

@media (max-width:992px) {
    .app-grid {
        grid-template-columns: 1fr
    }
}

@media (max-width:768px) {
    .nav-links-pc {
        display: none
    }

    .hamburger-toggle {
        display: flex
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 1rem
    }

    .content-grid {
        grid-template-columns: 1fr
    }
}

@media (max-width:480px) {
    .btn-group {
        grid-template-columns: 1fr
    }
}