.hidden {
    display: none !important;
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-bar {
    justify-content: flex-end;
    gap: 12px;
}

.language-label {
    font-size: 0.95rem;
    color: #666;
}

.language-select {
    min-width: 140px;
    padding: 8px 12px;
    border: 1px solid #d6d9e0;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    color: #2c3e50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.02em;
}

/* Navigation Styles */
.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: #f8f9fa;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
}

/* Page Styles */
.page {
    display: none;
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.page.active {
    display: block;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Home Page Styles */
.welcome-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
}

.welcome-section h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.welcome-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 1rem;
}

/* Main Content */
.main {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.card-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Font Converter Card */
.font-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1.1rem;
    margin-bottom: 18px;
    transition: border-color 0.3s ease;
}

.font-input:focus {
    outline: none;
    border-color: #667eea;
}

.preview-btn {
    width: 100%;
    padding: 16px 18px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.preview-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.saved-fonts-card {
    margin-bottom: 30px;
}

.saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.saved-actions {
    display: flex;
    gap: 8px;
}

.saved-header h3 {
    font-size: 1.3rem;
    color: #2c3e50;
}

.saved-copy-all-btn,
.saved-clear-btn {
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #f8f9fa;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-copy-all-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.saved-clear-btn:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.saved-description {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.saved-fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.saved-item {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.saved-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.saved-item-text {
    font-size: 1rem;
    word-break: break-all;
    padding-right: 60px;
}

.saved-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.saved-copy-btn,
.saved-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.saved-copy-btn {
    background: transparent;
    color: #667eea;
}

.saved-copy-btn:hover {
    background: #667eea;
    color: white;
}

.saved-remove-btn {
    background: #f1f3f8;
    color: #666;
}

.saved-remove-btn:hover {
    background: #ff6b6b;
    color: white;
}

.saved-empty {
    color: #999;
    text-align: center;
    padding: 10px 0;
    grid-column: 1 / -1;
}


.font-output-container {
    position: relative;
    margin-bottom: 20px;
}

.font-output {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    min-height: 80px;
    font-size: 1.2rem;
    text-align: center;
    border: 2px dashed #ddd;
    color: #666;
    word-break: break-all;
    margin-bottom: 10px;
}

.font-styles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.font-style-item {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-style-item:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.font-style-preview {
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-all;
    line-height: 1.2;
}

.copy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Category Buttons */
.char-categories,
.emoji-categories,
.ascii-categories,
.unicode-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn,
.emoji-category-btn,
.ascii-category-btn,
.unicode-category-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.category-btn:hover,
.emoji-category-btn:hover,
.ascii-category-btn:hover,
.unicode-category-btn:hover,
.category-btn.active,
.emoji-category-btn.active,
.ascii-category-btn.active,
.unicode-category-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Grid Layouts */
.char-grid,
.emoji-grid,
.ascii-grid,
.unicode-grid,
.lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.char-item,
.emoji-item,
.ascii-item,
.unicode-item,
.line-item {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

.char-item:hover,
.emoji-item:hover,
.ascii-item:hover,
.unicode-item:hover,
.line-item:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ASCII Art specific */
.ascii-item {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: pre;
    min-height: 80px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-input {
        padding: 15px 20px;
    }
    
    .search-btn {
        padding: 15px 20px;
        border-radius: 0 0 12px 12px;
    }
    
    .char-grid,
    .emoji-grid,
    .ascii-grid,
    .unicode-grid,
    .lines-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }
    
    .char-item,
    .emoji-item,
    .ascii-item,
    .unicode-item,
    .line-item {
        padding: 10px;
        font-size: 1rem;
        min-height: 40px;
    }
    
    .ascii-item {
        font-size: 0.7rem;
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 40px 0;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .main {
        padding: 40px 0;
    }
    
    .char-grid,
    .emoji-grid,
    .ascii-grid,
    .unicode-grid,
    .lines-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }
}

/* New Card Styles */
.deco-categories,
.fancy-categories,
.stick-categories,
.scary-categories,
.hieroglyph-categories,
.loud-categories,
.japanese-categories,
.hashtag-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.deco-category-btn,
.fancy-category-btn,
.stick-category-btn,
.scary-category-btn,
.hieroglyph-category-btn,
.loud-category-btn,
.japanese-category-btn,
.hashtag-category-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.deco-category-btn:hover,
.fancy-category-btn:hover,
.stick-category-btn:hover,
.scary-category-btn:hover,
.hieroglyph-category-btn:hover,
.loud-category-btn:hover,
.japanese-category-btn:hover,
.hashtag-category-btn:hover,
.deco-category-btn.active,
.fancy-category-btn.active,
.stick-category-btn.active,
.scary-category-btn.active,
.hieroglyph-category-btn.active,
.loud-category-btn.active,
.japanese-category-btn.active,
.hashtag-category-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.deco-grid,
.fancy-grid,
.stick-grid,
.scary-grid,
.hieroglyph-grid,
.loud-grid,
.japanese-grid,
.hashtag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.deco-item,
.fancy-item,
.stick-item,
.scary-item,
.hieroglyph-item,
.loud-item,
.japanese-item,
.hashtag-item {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

.deco-item:hover,
.fancy-item:hover,
.stick-item:hover,
.scary-item:hover,
.hieroglyph-item:hover,
.loud-item:hover,
.japanese-item:hover,
.hashtag-item:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Emoji Maker Styles */
.emoji-maker {
    text-align: center;
}

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

.part-category h4 {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
}

.part-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.part-btn {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.part-btn:hover,
.part-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.emoji-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 2rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
}

/* Morse Code Converter */
.morse-converter {
    text-align: center;
}

.morse-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.morse-input:focus {
    outline: none;
    border-color: #667eea;
}

.morse-output {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    min-height: 60px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    text-align: center;
    border: 2px dashed #ddd;
    color: #666;
    word-break: break-all;
}

/* Scrollbar Styling */
.char-grid::-webkit-scrollbar,
.emoji-grid::-webkit-scrollbar,
.ascii-grid::-webkit-scrollbar,
.unicode-grid::-webkit-scrollbar,
.lines-grid::-webkit-scrollbar,
.deco-grid::-webkit-scrollbar,
.fancy-grid::-webkit-scrollbar,
.stick-grid::-webkit-scrollbar,
.scary-grid::-webkit-scrollbar,
.hieroglyph-grid::-webkit-scrollbar,
.loud-grid::-webkit-scrollbar,
.japanese-grid::-webkit-scrollbar,
.hashtag-grid::-webkit-scrollbar {
    width: 6px;
}

.char-grid::-webkit-scrollbar-track,
.emoji-grid::-webkit-scrollbar-track,
.ascii-grid::-webkit-scrollbar-track,
.unicode-grid::-webkit-scrollbar-track,
.lines-grid::-webkit-scrollbar-track,
.deco-grid::-webkit-scrollbar-track,
.fancy-grid::-webkit-scrollbar-track,
.stick-grid::-webkit-scrollbar-track,
.scary-grid::-webkit-scrollbar-track,
.hieroglyph-grid::-webkit-scrollbar-track,
.loud-grid::-webkit-scrollbar-track,
.japanese-grid::-webkit-scrollbar-track,
.hashtag-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.char-grid::-webkit-scrollbar-thumb,
.emoji-grid::-webkit-scrollbar-thumb,
.ascii-grid::-webkit-scrollbar-thumb,
.unicode-grid::-webkit-scrollbar-thumb,
.lines-grid::-webkit-scrollbar-thumb,
.deco-grid::-webkit-scrollbar-thumb,
.fancy-grid::-webkit-scrollbar-thumb,
.stick-grid::-webkit-scrollbar-thumb,
.scary-grid::-webkit-scrollbar-thumb,
.hieroglyph-grid::-webkit-scrollbar-thumb,
.loud-grid::-webkit-scrollbar-thumb,
.japanese-grid::-webkit-scrollbar-thumb,
.hashtag-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.char-grid::-webkit-scrollbar-thumb:hover,
.emoji-grid::-webkit-scrollbar-thumb:hover,
.ascii-grid::-webkit-scrollbar-thumb:hover,
.unicode-grid::-webkit-scrollbar-thumb:hover,
.lines-grid::-webkit-scrollbar-thumb:hover,
.deco-grid::-webkit-scrollbar-thumb:hover,
.fancy-grid::-webkit-scrollbar-thumb:hover,
.stick-grid::-webkit-scrollbar-thumb:hover,
.scary-grid::-webkit-scrollbar-thumb:hover,
.hieroglyph-grid::-webkit-scrollbar-thumb:hover,
.loud-grid::-webkit-scrollbar-thumb:hover,
.japanese-grid::-webkit-scrollbar-thumb:hover,
.hashtag-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
