/* Special Symbols Tool - Apple Style CSS */

/* Root Variables - Apple Design System */
:root {
    /* Apple Color System */
    --primary-color: #007aff;
    --primary-gradient: linear-gradient(135deg, #007aff, #0051d3);
    --secondary-color: #34c759;
    --accent-color: #5856d6;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #aeaeb2;
    --bg-primary: #ffffff;
    --bg-secondary: #f2f2f7;
    --bg-tertiary: #f8f9fa;
    --separator: rgba(60, 60, 67, 0.12);
    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    --system-red: #ff3b30;
    --system-orange: #ff9500;
    --system-yellow: #ffcc00;
    --system-green: #34c759;
    --system-mint: #66d4cf;
    --system-teal: #5ac8fa;
    --system-cyan: #50e3c2;
    --system-blue: #007aff;
    --system-indigo: #5856d6;
    --system-purple: #af52de;
    --system-pink: #ff2d92;
    --system-brown: #a2845e;
    
    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    
    /* Animations */
    --animation-spring: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --animation-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Dark Mode */
    --bg-primary-dark: #000000;
    --bg-secondary-dark: #1c1c1e;
    --bg-tertiary-dark: #2c2c2e;
    --text-primary-dark: #ffffff;
    --text-secondary-dark: #98989d;
    --text-tertiary-dark: #636366;
    --separator-dark: rgba(84, 84, 88, 0.6);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: var(--bg-primary-dark);
    --bg-secondary: var(--bg-secondary-dark);
    --bg-tertiary: var(--bg-tertiary-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --text-tertiary: var(--text-tertiary-dark);
    --separator: var(--separator-dark);
    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-system);
    color: var(--text-primary);
    line-height: 1.47059;
    background: var(--bg-secondary);
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.003em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s var(--animation-spring);
}

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

/* Header Styles - Apple Style */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s var(--animation-spring);
}

[data-theme="dark"] header {
    background: rgba(28, 28, 30, 0.8);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

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

.logo h1 {
    font-size: 28px;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.022em;
    font-weight: 700;
}

.logo span {
    color: var(--primary-color);
}

.logo p {
    margin: 0 0 0 12px;
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: -0.016em;
    font-weight: 400;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin-left: 32px;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 17px;
    position: relative;
    transition: all 0.25s var(--animation-spring);
    letter-spacing: -0.022em;
}

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

nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
    transition: width 0.25s var(--animation-spring);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section - Apple Style */
.hero {
    background: linear-gradient(180deg, 
        rgba(247, 247, 247, 0.8) 0%, 
        rgba(255, 255, 255, 0.95) 50%,
        rgba(247, 247, 247, 0.8) 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: linear-gradient(180deg, 
        rgba(28, 28, 30, 0.8) 0%, 
        rgba(0, 0, 0, 0.95) 50%,
        rgba(28, 28, 30, 0.8) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, 
        rgba(0, 122, 255, 0.05) 0%, 
        rgba(0, 122, 255, 0.02) 40%,
        transparent 70%);
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 1.2s var(--animation-spring) 0.6s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    letter-spacing: -0.055em;
    line-height: 1.07143;
    background: linear-gradient(135deg, 
        var(--text-primary) 0%, 
        var(--primary-color) 50%,
        var(--accent-color) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInUp 0.8s var(--animation-spring) 0.2s forwards;
}

.hero p {
    font-size: 21px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: -0.016em;
    line-height: 1.38095;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.8s var(--animation-spring) 0.4s forwards;
}

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

/* Main Content Area */
.main {
    padding: 40px 0 80px;
}

/* App Container - Apple Style Card */
.app-container {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 0.5px solid var(--separator);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Search Section */
.search-section {
    padding: 32px;
    border-bottom: 0.5px solid var(--separator);
    background: linear-gradient(180deg, 
        var(--bg-primary) 0%, 
        var(--bg-tertiary) 100%);
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 20px;
    color: var(--text-tertiary);
    font-size: 16px;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 1px solid var(--separator);
    border-radius: 16px;
    font-size: 17px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.25s var(--animation-spring);
    font-family: var(--font-system);
    letter-spacing: -0.022em;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    background: var(--bg-primary);
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-clear {
    position: absolute;
    right: 16px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--text-tertiary);
    color: var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.25s var(--animation-spring);
}

.search-clear:hover {
    background: var(--text-secondary);
    transform: scale(1.1);
}

/* Categories Section */
.categories-section {
    padding: 32px;
    border-bottom: 0.5px solid var(--separator);
}

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

.categories-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.022em;
}

.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 4px;
    border: 0.5px solid var(--separator);
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s var(--animation-spring);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn.active,
.view-btn:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 0.5px solid var(--separator);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.016em;
    cursor: pointer;
    transition: all 0.25s var(--animation-spring);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.category-tab:hover {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.2);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.category-tab.active::before {
    display: none;
}

.tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.category-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Symbols Section */
.symbols-section {
    padding: 32px;
}

.symbols-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.symbols-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.symbols-count {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.symbols-sort label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.symbols-sort select {
    padding: 8px 12px;
    border: 1px solid var(--separator);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s var(--animation-spring);
}

.symbols-sort select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.clear-filters {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--system-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--animation-spring);
}

.clear-filters:hover {
    background: #d70015;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

/* Symbols Grid */
.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.symbols-grid.list-view {
    grid-template-columns: 1fr;
    gap: 8px;
}

.symbol-card {
    background: var(--bg-primary);
    border: 1px solid var(--separator);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s var(--animation-spring);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.symbols-grid.list-view .symbol-card {
    flex-direction: row;
    text-align: left;
    padding: 16px 20px;
    gap: 16px;
}

.symbol-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

.symbol-card.copying {
    animation: copyPulse 0.3s var(--animation-bounce);
}

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

.symbol-char {
    font-size: 32px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
    user-select: none;
}

.symbols-grid.list-view .symbol-char {
    font-size: 24px;
    min-width: 40px;
}

.symbol-info {
    flex: 1;
}

.symbols-grid.list-view .symbol-info {
    text-align: left;
}

.symbol-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    letter-spacing: -0.016em;
}

.symbol-unicode {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-weight: 400;
}

.symbol-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: all 0.25s var(--animation-spring);
}

.symbol-card:hover .symbol-actions {
    opacity: 1;
}

.symbol-action {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.25s var(--animation-spring);
}

.symbol-action:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s var(--animation-spring);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.load-more-btn:hover {
    background: #0066cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--animation-spring);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s var(--animation-spring);
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--animation-spring);
}

.modal-close:hover {
    background: var(--system-red);
    color: white;
    transform: scale(1.1);
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 15px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-primary);
    border: 0.5px solid var(--separator);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s var(--animation-spring);
}

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

.toast.success {
    border-color: var(--system-green);
    background: rgba(52, 199, 89, 0.05);
}

.toast.error {
    border-color: var(--system-red);
    background: rgba(255, 59, 48, 0.05);
}

.toast-icon {
    color: var(--system-green);
    font-size: 16px;
}

.toast.error .toast-icon {
    color: var(--system-red);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, 
        var(--bg-primary) 0%, 
        var(--bg-secondary) 100%);
    padding: 60px 0 40px;
    border-top: 0.5px solid var(--separator);
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s var(--animation-spring);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 48px;
        letter-spacing: -0.048em;
    }
    
    .symbols-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 16px;
    }
    
    header .container {
        flex-direction: column;
        gap: 16px;
    }
    
    nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 36px;
        letter-spacing: -0.036em;
    }
    
    .hero p {
        font-size: 17px;
    }
    
    .search-section,
    .categories-section,
    .symbols-section {
        padding: 24px;
    }
    
    .categories-tabs {
        gap: 8px;
    }
    
    .category-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .symbols-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .symbol-card {
        padding: 16px;
    }
    
    .symbol-char {
        font-size: 24px;
    }
    
    .symbols-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .symbols-info {
        justify-content: space-between;
    }
    
    .modal-content {
        padding: 24px;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        margin-bottom: 20px;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
        letter-spacing: -0.028em;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .symbols-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }
    
    .symbol-card {
        padding: 12px;
    }
    
    .symbol-char {
        font-size: 20px;
    }
    
    .symbol-name {
        font-size: 11px;
    }
    
    .symbol-unicode {
        font-size: 9px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--separator);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Selection Styles */
::selection {
    background: rgba(0, 122, 255, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 122, 255, 0.2);
    color: var(--text-primary);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--separator);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Focus Styles */
button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Print Styles */
@media print {
    .header,
    .search-section,
    .categories-section,
    .footer {
        display: none;
    }
    
    .symbols-section {
        padding: 0;
    }
    
    .symbol-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
} 