:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #2b2d42;
    --accent: #f72585;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --navbar-height: 70px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: #f8f9fc;
    line-height: 1.6;
    padding-top: var(--navbar-height);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-success {
    background-color: var(--success);
    color: var(--dark);
}

.btn-success:hover {
    background-color: #3ac2e6;
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.4);
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: var(--transition);
    height: var(--navbar-height);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    margin: 0 0.5rem;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    background-color: var(--light);
}

/* Hero Section - Reduced */
.hero {
    padding: 3rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsIDI1NSwgMjU1LCAwLjA1KSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.5;
    z-index: 0;
}

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

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.hero .lead {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--gray);
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Search Section - Reduced */
.search-section {
    background-color: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.search-form {
    position: relative;
    margin-bottom: 1rem;
}

.search-form input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 3rem;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    outline: none;
}

.search-form i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background-color: var(--light-gray);
    color: var(--dark);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.category-btn:hover, .category-btn.active {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Demo Cards */
.demos-section {
    padding: 1rem 0 4rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.demo-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1.25rem;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--success));
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-header .category {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 500;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
}

.card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body p {
    color: var(--gray);
    margin-bottom: 0;
    flex-grow: 1;
    font-size: 0.95rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background-color: var(--light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-url {
    font-size: 0.8rem;
    color: var(--primary);
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-demo-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.8rem;
}

/* Alert - Reduced */
.alert-notice {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ffc107;
    position: relative;
}

.alert-notice i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    color: #ffc107;
    flex-shrink: 0;
}

.alert-notice .alert-content {
    flex-grow: 1;
}

.alert-notice .close-btn {
    background: none;
    border: none;
    color: #856404;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    margin-left: 1rem;
    flex-shrink: 0;
}

.alert-notice .close-btn:hover {
    opacity: 1;
}

.alert-notice.hidden {
    display: none;
}

/* Admin Panel */
.admin-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.admin-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(247, 37, 133, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.admin-btn:hover {
    background-color: #e91e63;
    transform: scale(1.1);
}

/* Footer - Simplified */
footer {
    background-color: var(--secondary);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
    /* position: absolute;
    bottom: 0;
    width: 100%; */
}

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

.footer-brand h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .demos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 0 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .demos-grid {
        grid-template-columns: 1fr;
    }
    
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .demo-url {
        max-width: 100%;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .alert-notice {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alert-notice .close-btn {
        align-self: flex-end;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 5px;
}
.page-btn {
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 0 3px;
    cursor: pointer;
    background: white;
    transition: background 0.2s;
}
.page-btn:hover:not(.active):not(.disabled) {
    background: #f0f0f0;
}
.page-btn.active {
    background: var(--primary);
    color: white;
    font-weight: bold;
}
.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}