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

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', SFMono-Regular, 'Consolas', 'Liberation Mono', Menlo, monospace;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.site-header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-logo-bar {
    padding: 18px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: inline-block;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.header-nav-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.header-nav-bar .header-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: color var(--transition);
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-badge {
    background: var(--badge, #e74c3c);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '\25BC';
    font-size: 8px;
    margin-left: 4px;
    opacity: 0.5;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: var(--radius-sm);
    min-width: 220px;
    padding: 6px 0;
    z-index: 200;
    list-style: none;
    margin: 0;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 14px;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
}

.nav-search-btn:hover {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all var(--transition);
}

.hero-section {
    text-align: center;
    padding: 48px 0 32px;
}

.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 18px;
    color: var(--border-dark);
    line-height: 1;
}

.star.filled,
.star.active {
    color: var(--star, #f59e0b);
}

.star.partial {
    background: linear-gradient(90deg, var(--star, #f59e0b) 80%, var(--border-dark) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-text {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.intro-text {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 32px;
}

.intro-text strong {
    color: var(--text-dark);
}

.hero-image {
    margin: 32px auto;
}

.hero-image img {
    max-width: 280px;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
}

.section {
    padding: 48px 0;
}

.section:nth-child(even) {
    background: var(--bg-white);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 20px;
}

.info-quote {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dark);
}

.copy-box {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition);
}

.copy-box:hover {
    border-color: var(--primary);
}

.empty-char-display {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--bg-gray);
    border: 1px dashed var(--border-dark);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--text-light);
    position: relative;
}

.empty-char-display::before {
    content: 'Empty Character Here';
    position: absolute;
    font-size: 12px;
    color: var(--text-light);
    top: 4px;
    left: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
}

.btn-success:hover {
    background: #15803d;
}

.btn-success:disabled {
    background: #86efac;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-control {
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 20px;
    font-weight: 700;
}

.btn-control:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-btn .btn-copied {
    display: none;
}

.copy-btn.copied .btn-text {
    display: none;
}

.copy-btn.copied .btn-copied {
    display: inline;
}

.copy-btn.copied {
    background: var(--success);
}

.copy-btn.copied:hover {
    background: var(--success);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.generator-box {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.generator-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.number-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.number-input {
    width: 100px;
    height: 44px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    color: var(--text-dark);
    outline: none;
    transition: border-color var(--transition);
    -moz-appearance: textfield;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input:focus {
    border-color: var(--primary);
}

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

.result-area {
    width: 100%;
    margin-bottom: 16px;
}

.result-textarea {
    width: 100%;
    min-height: 100px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-dark);
    resize: vertical;
    font-family: inherit;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.result-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.result-textarea.has-content {
    background: var(--primary-light);
    border-color: var(--primary);
}

.btn.btn-generated {
    background: var(--success);
    color: white;
}

.btn.btn-generated:hover {
    background: #15803d;
}

.copy-button-container {
    text-align: center;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.copied-message {
    display: none;
    color: var(--success);
    font-weight: 600;
    font-size: 14px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    font-size: 14px;
}

.data-table thead {
    background: var(--primary);
    color: white;
}

.data-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:nth-child(even) {
    background: var(--bg-gray);
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.space-char-table .label-cell {
    font-weight: 600;
    color: var(--text-dark);
    width: 40%;
    background: var(--bg-gray);
}

.space-char-table .value-cell {
    color: var(--text-muted);
}

code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--error, #e11d48);
    border: 1px solid var(--border);
}

.char-link {
    font-weight: 500;
    color: var(--primary);
}

.char-link:hover {
    text-decoration: underline;
}

.example-cell {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 14px;
}

.nickname-section {
    background: var(--bg-white);
}

.nickname-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    max-width: 600px;
    justify-content: center;
}

.nickname-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--text-dark);
    outline: none;
    transition: border-color var(--transition);
}

.nickname-input:focus {
    border-color: var(--primary);
}

.nicknames-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 24px;
}

.nicknames-grid .input-group {
    margin: 0;
}

.nickname-item {
    padding: 14px 18px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    overflow: hidden;
}

.nickname-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(4px);
}

.nickname-item:active {
    transform: translateX(2px);
}

.nickname-item.copied {
    background: var(--success-bg);
    border-color: var(--success);
}

.nickname-item.copied::after {
    content: 'Copied!';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
}

.load-more-btn,
.loadmore {
    display: inline-block;
    margin: 16px auto 0;
    padding: 12px 32px;
    cursor: pointer;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all var(--transition);
}

.load-more-btn:hover,
.loadmore:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.changelog-section {
    background: var(--bg-light);
    padding: 48px 0;
}

.changelog-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.changelog-entry {
    margin-bottom: 20px;
}

.version-tag {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.changelog-category {
    margin: 12px 0 8px;
    font-size: 14px;
}

.changelog-list {
    padding-left: 24px;
    margin-bottom: 8px;
}

.changelog-list li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 4px;
}

.changelog-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.empty-char-display-second {
    margin-top: 20px;
    margin-bottom: 0;
}

.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 0 0 24px;
}

.footer-top-bar {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

.footer-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.footer-brand-link:hover {
    color: white;
    opacity: 0.9;
}

.footer-favicon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.footer-favicon-lg {
    width: 48px;
    height: 48px;
}

.footer-content {
    margin-bottom: 32px;
}

.footer-info {
    padding-top: 8px;
}

.footer-logo {
    display: inline-block;
    text-decoration: none;
}

.footer-logo:hover {
    opacity: 0.9;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 16px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.post-meta {
    margin-bottom: 16px;
}

.post-category a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}

.char-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.char-description p {
    margin-bottom: 12px;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.vertical-table td.label-cell {
    font-weight: 600;
    width: 200px;
    background: var(--bg-light);
}

.ws-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    margin-bottom: 16px;
}

.ws-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.ws-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.about-content,
.static-page-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 800px;
}

.about-content p,
.static-page-content p {
    margin-bottom: 16px;
}

.static-page-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 12px;
}

.static-page-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 24px 0 8px;
}

.static-page-content ul {
    margin: 0 0 16px 24px;
}

.static-page-content li {
    margin-bottom: 8px;
}

.static-page-content a {
    color: var(--primary);
}

.static-page-content a:hover {
    text-decoration: underline;
}

.about-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 0 0 24px 0;
    background: var(--bg-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-dark);
}

@media (max-width: 960px) {
    .nav-link {
        padding: 12px 8px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .header-nav-bar {
        position: relative;
    }

    .header-nav-bar .header-container {
        justify-content: flex-end;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 20px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        z-index: 200;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        padding: 10px 16px;
        font-size: 15px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        padding: 12px 8px;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        min-width: auto;
    }

    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .section-title {
        font-size: 20px;
    }

    .copy-box,
    .generator-box {
        padding: 20px;
    }

    .footer-info {
        text-align: center;
    }

    .nickname-input-group {
        flex-direction: column;
        max-width: 100%;
    }

    .hero-image img {
        max-width: 200px;
    }

    .header-container {
        height: 56px;
    }

    .hero-section {
        padding: 32px 0 20px;
    }

    .page-title {
        font-size: 20px;
    }

    .vertical-table td.label-cell {
        width: auto;
        min-width: 120px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .footer-top-bar {
        margin-bottom: 20px;
    }

    .footer-brand-link {
        justify-content: center;
    }

    .footer-content {
        margin-bottom: 20px;
    }

    .ws-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-actions .btn {
        width: 100%;
    }

    .number-input-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .generator-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .generator-actions .btn {
        width: 100%;
    }

    .content-section h2 {
        font-size: 18px;
    }

    .rating-display {
        flex-wrap: wrap;
        justify-content: center;
    }

    .breadcrumb {
        font-size: 12px;
        word-break: break-word;
    }

    .char-description {
        font-size: 14px;
    }

    .table-responsive {
        margin: 0 -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 32px 0;
    }

    .intro-text {
        font-size: 15px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table td,
    .data-table th {
        padding: 8px 10px;
    }

    .page-title {
        font-size: 18px;
    }

    .section-title {
        font-size: 18px;
    }

    .copy-box,
    .generator-box {
        padding: 16px;
    }

    .empty-char-display {
        min-height: 48px;
        font-size: 24px;
    }

    .hero-image img {
        max-width: 160px;
    }

    .table-responsive {
        margin: 0 -16px;
    }

    .footer-bottom p {
        font-size: 12px;
    }
}

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

.nickname-item {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.copy-btn.copied {
    animation: pulse 0.3s ease;
}

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