* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #3B82F6;
    --primary-purple: #6366F1;
    --primary-gradient: linear-gradient(135deg, #3B82F6, #6366F1);
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
}

[data-theme="dark"] {
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.5rem 0.75rem;
    transition: box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.navbar:hover {
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.brand-logo {
    height: 1.875rem;
    width: auto;
    max-height: 36px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 0.5rem;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-logo:active {
    transform: scale(0.95);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: none;
    letter-spacing: -0.02em;
}

.brand-slogan {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    display: none;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border-color);
}

@media (min-width: 640px) {
    .brand-slogan {
        display: block;
    }
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-menu-btn:hover {
    background: var(--bg-light);
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.25rem;
    min-width: 160px;
    z-index: 100;
}

.mobile-dropdown.show {
    display: flex;
    flex-direction: column;
}

.mobile-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.mobile-tab-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.navbar-tabs {
    display: none;
    gap: 0.125rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 0.5rem;
    padding-bottom: 0.25rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}

.navbar-tabs::-webkit-scrollbar {
    display: none;
}

@media (min-width: 640px) {
    .navbar-tabs {
        display: flex;
        margin-top: 0;
        padding-bottom: 0;
        flex: 1;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .mobile-dropdown {
        display: none;
    }
    
    .navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.875rem 1.5rem;
        gap: 1rem;
    }
    
    .navbar-brand {
        flex-shrink: 0;
        position: static;
        left: auto;
        transform: none;
    }
    
    .brand-logo {
        height: 2.5rem;
        max-height: 48px;
    }
    
    .brand-name {
        display: inline;
    }
    
    .usage-info {
        flex-shrink: 0;
        margin-top: 0;
        flex-wrap: nowrap;
    }
}

@media (min-width: 768px) {
    .navbar {
        padding: 0.875rem 2rem;
    }
}

.tab-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.625rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 52px;
    min-width: 52px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    gap: 0.25rem;
}

.tab-btn .tab-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.tab-btn .tab-text {
    font-size: 0.7rem;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .tab-btn {
        flex-direction: row;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .tab-btn .tab-text {
        font-size: 0.8125rem;
    }
}

@media (min-width: 640px) {
    .tab-btn {
        flex-direction: row;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

.tab-btn:hover {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.08);
}

.tab-btn.active {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: inset 0 -2px 0 0 var(--primary-blue);
}

.tab-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 12rem 0.75rem 1.5rem;
}

@media (max-width: 480px) {
    main {
        padding: 10rem 0.5rem 1rem;
    }
}

.tool-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-panel.active {
    display: block;
}

.tool-header {
    margin-bottom: 1.5rem;
}

.tool-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.tool-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

@media (min-width: 768px) {
    .tool-content {
        padding: 2rem;
    }
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-group textarea,
.input-group input[type="text"],
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-light);
    color: var(--text-primary);
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 100px;
}

.input-group input[type="text"] {
    min-height: 48px;
}

.input-group textarea:focus,
.input-group input[type="text"]:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--bg-white);
}

.input-group textarea::placeholder,
.input-group input[type="text"]::placeholder {
    color: var(--text-muted);
}

.radio-group {
    border: none;
    padding: 0;
}

.radio-group legend {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    border: 1px solid transparent;
}

.radio-label:hover {
    background: rgba(59, 130, 246, 0.08);
}

.radio-label input[type="radio"] {
    accent-color: var(--primary-blue);
    width: 16px;
    height: 16px;
}

.tag-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.tag-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.tag-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-selector select {
    flex: 1;
    min-height: 48px;
}

.swap-btn {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.swap-btn:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.generate-btn {
    width: 100%;
    padding: 0.9375rem 1.5rem;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: none;
    animation: fadeIn 0.3s ease;
}

.results-container.show {
    display: block;
}

.results-container h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cards-grid {
    display: grid;
    gap: 1rem;
}

.card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
    position: relative;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.375rem;
}

.card-copy {
    padding: 0.375rem 0.625rem;
    border: none;
    background: white;
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.card-copy:hover {
    background: var(--primary-blue);
    color: white;
}

.card-share {
    padding: 0.375rem 0.625rem;
    border: none;
    background: white;
    color: var(--primary-purple);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.card-share:hover {
    background: var(--primary-purple);
    color: white;
}

.headline-list {
    list-style: none;
}

.headline-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.headline-list li:hover {
    box-shadow: var(--shadow-sm);
}

.headline-list li span:first-child {
    color: var(--primary-blue);
    font-weight: 600;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.headline-list li span:nth-child(2) {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.headline-copy {
    padding: 0.25rem 0.5rem;
    border: none;
    background: white;
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.headline-copy:hover {
    background: var(--primary-blue);
    color: white;
}

.summary-content {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
    margin-bottom: 1rem;
}

.summary-content ul {
    list-style: none;
}

.summary-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.summary-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: 600;
}

.summary-content p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.translate-content {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.copy-all-btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--primary-blue);
    background: white;
    color: var(--primary-blue);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-all-btn:hover {
    background: var(--primary-blue);
    color: white;
}

footer {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-top: 1px solid var(--border-light);
    padding: 2rem 1rem 1.5rem;
    margin-top: 2rem;
    clear: both;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.footer-brand {
    margin: 0 auto;
    max-width: 200px;
}

.footer-links-grid {
    justify-items: center;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        text-align: left;
    }
    
    .footer-brand {
        margin: 0;
    }
    
    .footer-links-grid {
        justify-items: start;
    }
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand-logo {
    height: 1.75rem;
    width: auto;
    max-height: 1.75rem;
    object-fit: contain;
    vertical-align: middle;
}

.footer-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.footer-links-grid a {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    background: transparent;
    transition: all 0.2s ease;
}

.footer-links-grid a:hover {
    color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.08);
}

.footer-disclaimer {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.footer-disclaimer p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.footer-disclaimer strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.footer-info .separator {
    color: var(--border-color);
}

.footer-info a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-info a:hover {
    color: var(--primary-blue);
}

.footer-beian {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-beian a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-beian a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 768px) {
    .navbar {
        padding: 0.875rem 2rem;
    }
    
    main {
        padding: 8rem 2rem 2rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    main {
        padding: 7.5rem 2rem 2rem;
    }
}

.history-btn {
    position: relative;
}

.history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-purple);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 1.25rem;
    text-align: center;
    margin-left: 0.25rem;
}

.history-btn {
    position: relative;
}

.history-btn .history-count {
    position: absolute;
    top: 4px;
    right: 4px;
}

.usage-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.usage-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.usage-count strong {
    color: var(--primary-purple);
    font-weight: 600;
}

.watch-ad-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #F59E0B;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    color: #92400E;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 36px;
}

.watch-ad-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.theme-toggle {
    padding: 0.375rem;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.theme-toggle:hover {
    background: var(--bg-light);
    border-color: var(--primary-blue);
    transform: scale(1.05);
}

.watch-ad-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.ad-modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: scaleIn 0.3s ease;
}

.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.share-modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: scaleIn 0.3s ease;
}

.share-modal h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-option:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.share-icon {
    font-size: 1.5rem;
}

.share-close {
    padding: 0.5rem 1.5rem;
    border: none;
    background: var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-close:hover {
    background: var(--text-muted);
    color: white;
}

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.onboarding-modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: scaleIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.onboarding-progress {
    display: flex;
    gap: 0.5rem;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

.onboarding-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.onboarding-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.onboarding-content h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.onboarding-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.onboarding-footer {
    margin-top: 2rem;
}

.onboarding-next {
    padding: 0.75rem 2rem;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.history-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.export-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.export-modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: scaleIn 0.3s ease;
}

.export-modal h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.export-modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.export-option:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.export-icon {
    font-size: 1.5rem;
}

.export-desc {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.export-option:hover .export-desc {
    color: rgba(255, 255, 255, 0.8);
}

.export-close {
    padding: 0.5rem 1.5rem;
    border: none;
    background: var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-close:hover {
    background: var(--text-muted);
    color: white;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ad-modal h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.ad-modal p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.ad-progress-container {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    height: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ad-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    transition: width 0.1s linear;
}

.ad-countdown {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ad-reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: #065F46;
    font-weight: 600;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.ad-close-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
    width: 100%;
}

.ad-close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

@media (min-width: 640px) {
    .usage-info {
        flex-direction: row;
        align-items: center;
    }
}

.history-container {
    min-height: 200px;
}

.history-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.history-empty p {
    margin-bottom: 0.5rem;
}

.history-empty .text-sm {
    font-size: 0.875rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.history-icon {
    font-size: 1.25rem;
}

.history-type {
    font-weight: 600;
    color: var(--text-primary);
}

.history-time {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.history-content {
    margin-bottom: 0.75rem;
}

.history-input,
.history-result {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.375rem;
}

.history-input:last-child,
.history-result:last-child {
    margin-bottom: 0;
}

.history-input .label,
.history-result .label {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 0.5rem;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-copy,
.history-reuse {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-copy {
    background: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.history-copy:hover {
    background: var(--primary-blue);
    color: white;
}

.history-reuse {
    background: var(--primary-gradient);
    color: white;
}

.history-reuse:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.secondary-btn {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.secondary-btn:hover {
    background: var(--bg-light);
    box-shadow: none;
}

@media (min-width: 1280px) {
    main {
        max-width: 1000px;
    }
}
