* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Premium Color Palette */
:root {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --border-light: #e9eef3;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #eef2ff;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.02), 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 32px -12px rgba(0, 0, 0, 0.08);
    --radius-card: 20px;
    --radius-element: 14px;
    --radius-sm: 10px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.logo span {
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: var(--accent);
}

.auth {
    display: flex;
    gap: 0.75rem;
}

.btn-auth {
    padding: 0.5rem 1.125rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-signin {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-signin:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
}

.btn-signup {
    background: var(--accent);
    color: white;
}

.btn-signup:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    font-size: 1.25rem;
}

/* Main Container */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

/* 3-Column Layout */
.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.75rem;
    margin-bottom: 3rem;
}

/* Sidebar Cards */
.sidebar-left, .sidebar-right {
    align-self: start;
    position: sticky;
    top: 90px;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.category-group {
    margin-bottom: 1.25rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.2s;
}

.category-header:hover {
    color: var(--accent);
}

.category-header i:first-child {
    margin-right: 0.5rem;
}

.chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.chevron.rotated {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 1.5rem;
}

.category-content.open {
    max-height: 300px;
}

.category-content a {
    display: block;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.category-content a i {
    margin-right: 0.5rem;
    width: 1.25rem;
    font-size: 0.8125rem;
}

.category-content a:hover,
.category-content a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 500;
}

/* Tool Area */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.tool-header {
    padding: 1.75rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 0.75rem;
}

.tool-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Input Area */
.input-card {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.username-input-area label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.username-input-area input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-element);
    font-family: 'Inter', monospace;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.username-input-area input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.platform-selector {
    margin: 1.5rem 0;
}

.platform-selector label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.platform-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.platform-checkbox:hover {
    background: var(--accent-light);
}

.platform-checkbox input {
    width: auto;
    margin-right: 0.25rem;
    cursor: pointer;
}

.platform-checkbox i {
    font-size: 1rem;
    width: 1.25rem;
    color: var(--accent);
}

.toggle-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-element);
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.toggle-info i {
    color: var(--accent);
    font-size: 1rem;
}

.toggle-info span {
    font-weight: 500;
    font-size: 0.875rem;
}

.toggle-switch {
    width: 48px;
    height: 26px;
    background: #cbd5e1;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.toggle-switch.active {
    background: var(--accent);
}

.toggle-slider {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(22px);
}

.toggle-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 70px;
}

.btn-generate {
    width: 100%;
    padding: 0.875rem;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-element);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-generate:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Output Card */
.output-card {
    padding: 1.75rem 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.output-header span:first-child {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 2rem;
}

/* Results Container */
.results-container {
    margin-bottom: 1.5rem;
}

.results-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.results-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.result-card:hover {
    transform: translateX(4px);
}

.result-platform {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-platform i {
    font-size: 1.25rem;
    width: 1.75rem;
}

.result-platform .platform-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.status-available {
    color: var(--success);
}

.status-taken {
    color: var(--error);
}

.status-checking {
    color: var(--warning);
}

.status-badge-small {
    padding: 0.125rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Suggestions Card */
.suggestions-card {
    background: var(--accent-light);
    border-radius: var(--radius-element);
    padding: 1rem;
    margin-bottom: 1rem;
}

.suggestions-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.suggestions-header strong {
    color: var(--text-primary);
}

.suggestions-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
    background: var(--accent);
    color: white;
    border-radius: 2rem;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: white;
    border-radius: 2rem;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
}

.suggestion-tag:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
}

.suggestion-tag i {
    color: var(--accent);
    font-size: 0.75rem;
}

.insight-card {
    background: var(--accent-light);
    border-radius: var(--radius-element);
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.insight-icon {
    font-size: 1.125rem;
    color: var(--accent);
}

.insight-content strong {
    font-size: 0.875rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.insight-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Right Sidebar Content */
.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-list, .glossary-list {
    list-style: none;
}

.blog-list li, .glossary-list li {
    margin-bottom: 0.875rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}

.blog-list li:last-child, .glossary-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-list a, .glossary-list a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.blog-list a i, .glossary-list a i {
    font-size: 0.6875rem;
    color: var(--accent);
}

.blog-list a:hover, .glossary-list a:hover {
    color: var(--accent);
}

.post-meta, .glossary-list span {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-left: 1.25rem;
}

/* FAQ Section */
.faq-section {
    margin-top: 2rem;
    padding: 2rem 0;
}

.faq-header {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.faq-header p {
    color: var(--text-secondary);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.faq-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.faq-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-question span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-question span i {
    color: var(--accent);
}

.faq-chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
}

.faq-card.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 0;
}

.faq-card.open .faq-answer {
    max-height: 200px;
    margin-top: 0.75rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
    margin-top: 3rem;
    padding: 2rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand .logo {
    margin-bottom: 0.25rem;
}

.footer-brand p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Mobile Drawer - RIGHT SIDE */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: var(--bg-card);
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    overflow-y: auto;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.close-drawer {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.drawer-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.drawer-nav a i {
    width: 1.25rem;
    color: var(--accent);
}

.drawer-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1rem 0;
}

.drawer-categories .category-group {
    margin-bottom: 1rem;
}

.drawer-categories .category-header {
    padding: 0.5rem 0;
}

.drawer-categories .category-header i:first-child {
    margin-right: 0.5rem;
}

.drawer-categories .category-content {
    padding-left: 1.75rem;
}

.drawer-categories .category-content a i {
    margin-right: 0.5rem;
    width: 1.25rem;
}

.drawer-auth {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-auth button {
    padding: 0.75rem;
    border-radius: var(--radius-element);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.drawer-auth .btn-signin {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.drawer-auth .btn-signup {
    background: var(--accent);
    color: white;
    border: none;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}

.drawer-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 240px 1fr 280px;
        gap: 1.25rem;
    }
    
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.75rem 1.25rem;
    }
    
    .nav, .auth {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .main-container {
        padding: 1.25rem;
    }
    
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar-left {
        display: none;
    }
    
    .sidebar-right {
        order: 2;
        position: static;
    }
    
    .tool-area {
        order: 1;
    }
    
    .tool-header, .input-card, .output-card {
        padding: 1.25rem;
    }
    
    .tool-header h1 {
        font-size: 1.5rem;
    }
    
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-card {
        border-radius: var(--radius-element);
    }
    
    .faq-card {
        padding: 1rem;
    }
    
    .platform-grid {
        grid-template-columns: 1fr;
    }
}