/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8f9fa;
    color: #1a1a2e;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo span {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -1px;
}

.logo .highlight {
    color: #f5c518;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: #4a4a6a;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

.nav a:hover {
    color: #f5c518;
}

.nav a.active {
    color: #1a1a2e;
    border-bottom: 2px solid #f5c518;
    padding-bottom: 4px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #1a1a2e;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Buttons */
.btn-primary {
    background: #f5c518;
    color: #1a1a2e;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #e0b100;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.3);
}

.btn-secondary {
    background: #e9ecef;
    color: #4a4a6a;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background: #c82333;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.hero h1 span {
    color: #f5c518;
}

.hero p {
    font-size: 18px;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Categories */
.tool-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.category {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.category h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5c518;
}

.category ul {
    list-style: none;
}

.category ul li {
    padding: 8px 0;
}

.category ul li a {
    text-decoration: none;
    color: #4a4a6a;
    transition: color 0.3s;
    font-size: 14px;
}

.category ul li a:hover {
    color: #f5c518;
}

/* Featured Tool */
.featured {
    background: white;
    padding: 60px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.featured h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
}

.featured-tool {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.featured-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.featured-content p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 20px;
}

.preview-mockup {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.mockup-title {
    color: #1a0dab;
    font-size: 20px;
    font-weight: 500;
}

.mockup-url {
    color: #006621;
    font-size: 14px;
    margin: 2px 0;
}

.mockup-desc {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.5;
}

/* Footer */
.footer {
    padding: 60px 0 20px;
    background: #1a1a2e;
    color: #a0a0b0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    padding: 4px 0;
}

.footer-col ul li a {
    text-decoration: none;
    color: #a0a0b0;
    transition: color 0.3s;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #f5c518;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2a2a4e;
    font-size: 14px;
}

.footer-bottom a {
    color: #f5c518;
    text-decoration: none;
}

/* AI Modal */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.ai-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.ai-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.ai-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.ai-modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.ai-chat-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.ai-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    max-width: 85%;
}

.ai-user {
    background: #f5c518;
    color: #1a1a2e;
    margin-left: auto;
}

.ai-bot {
    background: #f0f0f0;
    color: #1a1a2e;
}

.ai-bot.typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.ai-bot.typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-bot.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

.ai-input-area {
    display: flex;
    gap: 12px;
}

.ai-input-area textarea {
    flex: 1;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: inherit;
    resize: vertical;
}

/* Tool Page Styles */
.tool-page {
    padding: 40px 0 60px;
}

.tool-page .header {
    margin-bottom: 30px;
    position: static;
    padding: 0;
    border: none;
}

.tool-page .header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
}

.tool-page .header p {
    color: #6c757d;
    font-size: 16px;
}

.tool-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.tool-card .form-group {
    margin-bottom: 20px;
}

.tool-card .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a2e;
    font-size: 14px;
}

.tool-card .form-group input,
.tool-card .form-group textarea,
.tool-card .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: #fafbfc;
    color: #1a1a2e;
}

.tool-card .form-group input:focus,
.tool-card .form-group textarea:focus {
    outline: none;
    border-color: #f5c518;
    box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.1);
    background: white;
}

.tool-card .code-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    margin: 12px 0;
    max-height: 300px;
    overflow-y: auto;
}

.tool-card .btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a1a2e;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: #1a1a2e;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #f5c518;
}

/* Character Status */
.char-counter {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 13px;
    color: #6c757d;
}

.char-status {
    font-weight: 500;
}

.status-perfect {
    color: #28a745;
}

.status-warning {
    color: #f5c518;
}

.status-danger {
    color: #dc3545;
}

.status-info {
    color: #6c757d;
}

/* Advanced Toggle */
.advanced-toggle {
    background: none;
    border: none;
    color: #f5c518;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    margin: 10px 0;
    padding: 0;
}

.advanced-section {
    display: none;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 8px 20px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    border-color: #f5c518;
    background: #f5c518;
    color: #1a1a2e;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* AI Suggestions */
.ai-suggestions {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid #f5c518;
}

.ai-suggestions h4 {
    margin-bottom: 12px;
    color: #1a1a2e;
}

/* Score Issues */
.score-issues {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.issue {
    font-size: 13px;
    padding: 4px 0;
    color: #6c757d;
}

.issue .icon {
    display: inline-block;
    width: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .tool-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-tool {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 16px;
        padding: 20px 0;
    }
    
    .nav.open {
        display: flex;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .tool-categories {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-card .btn-group {
        flex-direction: column;
    }
    
    .tool-card .btn-group .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .featured h2 {
        font-size: 24px;
    }
}