/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    font-size: 18px;
    color: #000;
    margin-top: -2px;
}

h1 {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: #000;
}

/* Navigation */
.nav {
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    border-radius: 3px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #000;
}

.nav-menu a strong {
    font-weight: 600;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 10px 0;
    min-width: 150px;
    display: none;
    list-style: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
    color: #000;
}

/* Limit Info */
.limit-info {
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 5px;
    margin: 20px 0;
    padding: 15px;
}

.limit-content h3 {
    color: #0066cc;
    margin-bottom: 10px;
    font-weight: 500;
}

.limit-content p {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
}

.doc-counter {
    background: #fff;
    border: 1px solid #4da6ff;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 14px;
    color: #0066cc;
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
}

/* Editor Section */
.editor {
    flex: 1;
    padding: 20px 0;
}

.page-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 10px;
    color: #000;
    text-align: center;
}

.page-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* SEO Section */
.seo-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    border-left: 4px solid #000;
}

.seo-section h3 {
    margin-bottom: 15px;
    font-weight: 500;
    color: #000;
}

.features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.features li {
    padding: 5px 0;
    color: #666;
    font-size: 14px;
}

/* Title Input */
.title-input {
    width: 100%;
    font-size: 24px;
    font-weight: 400;
    border: none;
    outline: none;
    margin-bottom: 20px;
    font-family: inherit;
    padding: 10px 0;
    color: #000;
    border-bottom: 1px solid #eee;
}

.title-input::placeholder {
    color: #999;
    font-weight: 300;
}

/* Editor Tools */
.editor-tools {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
    flex-wrap: wrap;
}

.tool-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    border-radius: 3px;
    color: #666;
    transition: all 0.2s;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.tool-btn:hover {
    border-color: #999;
    color: #000;
    background: #f5f5f5;
}

.tool-char {
    font-weight: 500;
}

.tool-divider {
    color: #eee;
    margin: 0 2px;
    font-size: 14px;
}

/* Text Editor */
.text-editor {
    min-height: 300px;
    font-size: 17px;
    line-height: 1.7;
    outline: none;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #fafafa;
    color: #333;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.text-editor:focus {
    border-color: #999;
    outline: none;
}

.text-editor:empty:before {
    content: attr(placeholder);
    color: #aaa;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin: 30px 0;
}

.btn {
    background: #fff;
    color: #000;
    border: 1px solid #ddd;
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    border-radius: 3px;
    font-weight: 400;
    flex: 1;
    height: 44px;
}

.btn:hover:not(:disabled) {
    border-color: #000;
    background: #000;
    color: #fff;
}

.btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}

.share-btn {
    flex: 2;
}

.clear-btn:hover {
    background: #666;
    color: #fff;
    border-color: #666;
}

/* Stats */
.stats-container {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.stats {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 18px;
    color: #000;
}

/* Link Container */
.link-container {
    margin: 40px 0;
    border: 1px solid #eee;
    border-radius: 5px;
    animation: fadeIn 0.3s ease;
}

.link-box {
    padding: 25px;
}

.link-box h3 {
    margin-bottom: 15px;
    font-weight: 400;
    font-size: 18px;
    color: #000;
}

.link-box p {
    margin-bottom: 20px;
    color: #666;
}

.link-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.link-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #fafafa;
    color: #333;
    height: 44px;
}

.link-input:focus {
    outline: none;
    border-color: #999;
}

.copy-btn {
    background: #000;
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
    height: 44px;
    min-width: 100px;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 0.9;
}

.link-info {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.link-info p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* SEO Content */
.seo-content {
    margin: 50px 0;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.seo-content h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 20px;
    color: #000;
}

.seo-content h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 25px 0 15px 0;
    color: #000;
}

.seo-content p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.7;
}

.seo-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.seo-content li {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 40px 0 20px 0;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #000;
}

.footer-links a strong {
    font-weight: 600;
}

.footer-copyright {
    color: #999;
    font-size: 13px;
    line-height: 1.6;
}

.tech-stack {
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #000;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.back-to-top:hover {
    background: #333;
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #000;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 14px;
    max-width: 300px;
    text-align: center;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 15px 0;
        position: relative;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 5px;
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        min-width: 200px;
        display: none;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        margin-top: 10px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 15px;
        padding: 0 10px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .title-input {
        font-size: 20px;
    }
    
    .editor-tools {
        justify-content: center;
    }
    
    .text-editor {
        min-height: 250px;
        font-size: 16px;
        padding: 15px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .link-row {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .seo-content {
        padding: 20px 0;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .text-editor {
        font-size: 15px;
    }
    
    .tool-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}