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

:root {
    --primary: #f38020;
    --secondary: #0051c3;
    --accent: #fbad41;
    --dark: #1f2937;
    --light: #f9fafb;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 2rem 0;
    box-shadow: 0 4px 12px var(--shadow);
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #e67316;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 128, 32, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--light);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Categories Section */
.categories {
    padding: 5rem 0;
    background: var(--white);
}

.categories h2, .interactive-section h2, .quiz-section h2, .resources h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.1);
}

.search-shortcut {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.search-input:focus + .search-shortcut {
    opacity: 0;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-result-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.search-result-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.search-result-description {
    font-size: 0.875rem;
    color: #6b7280;
}

.search-no-results {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.category-card p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: block;
}

.modal-content {
    background: var(--white);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 16px;
    max-width: 900px;
    position: relative;
    animation: slideUp 0.3s;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--dark);
}

/* Product Cards in Modal */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--light);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.product-card:hover {
    background: var(--white);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
}

.product-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.product-tag {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.product-detail {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
}

.product-detail h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.detail-section {
    margin: 2rem 0;
}

.detail-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.use-cases {
    display: grid;
    gap: 1rem;
}

.use-case {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* Interactive Section */
.interactive-section {
    padding: 5rem 0;
    background: var(--light);
}

.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.interactive-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s;
}

.interactive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-lg);
}

.interactive-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.interactive-icon {
    font-size: 2rem;
}

.interactive-card h3 {
    font-size: 1.25rem;
    color: var(--dark);
}

.interactive-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Quiz Section */
.quiz-section {
    padding: 5rem 0;
    background: var(--white);
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--light);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
}

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.quiz-options {
    display: grid;
    gap: 1rem;
}

.quiz-option {
    background: var(--white);
    border: 2px solid #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: #fff5ed;
}

.quiz-option.correct {
    border-color: #10b981;
    background: #d1fae5;
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
}

.quiz-result {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

/* Resources Section */
.resources {
    padding: 5rem 0;
    background: var(--light);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    text-align: center;
}

.resource-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.resource-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.resource-card a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.resource-card a:hover {
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
    margin: 0.25rem 0;
}

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

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

/* Interactive Demo Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 128, 32, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(243, 128, 32, 0);
    }
}

@keyframes moveDot {
    0% {
        left: 0;
    }
    100% {
        left: 100%;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes slideIn {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

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

@keyframes pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Apply animations to demo elements */
.pulse-animation {
    animation: pulse 2s infinite;
}

.shake-animation {
    animation: shake 0.5s infinite;
}

.slide-in-animation {
    animation: slideIn 1s ease-out;
}

.bounce-animation {
    animation: bounce 2s infinite;
}

.fade-in-animation {
    animation: fadeInUp 1s ease-out;
}

.scale-animation {
    animation: scale 2s infinite;
}

.pop-animation {
    animation: pop 0.6s ease-out;
}

/* Demo container styles */
.demo-container {
    margin: 2rem 0;
}

.demo-visual {
    position: relative;
    overflow: hidden;
}

.demo-element {
    transition: all 0.3s ease;
}

.demo-element:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .category-grid, .interactive-grid, .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% 1rem;
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}
