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

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #10b981;
    --dark: #1f2937;
    --light: #f5f5f7;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.1), 0 4px 6px -2px rgba(124, 58, 237, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(124, 58, 237, 0.1), 0 10px 10px -5px rgba(124, 58, 237, 0.04);
    --transition: all 0.3s ease;
}

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

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* App Bar */
.app-bar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
}

.app-bar-logo-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.app-bar-logo-text-top {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.app-bar-logo-text-bottom {
    color: var(--dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.app-bar-nav {
    display: flex;
    gap: 1.5rem;
}

.app-bar-link {
    color: var(--gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.app-bar-link:hover,
.app-bar-link.active {
    color: var(--primary);
}

.app-bar-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 6rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #8b5cf6 100%);
}

body.dark-theme .hero {
    background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 50%, #5b21b6 100%);
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: backgroundScroll 20s linear infinite;
}

@keyframes backgroundScroll {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(60px, 60px);
    }
}

.hero-content {
    text-align: center;
    padding: 2rem 0;
}

.logo-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.logo-itsall {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -1px;
    animation: floating 3s ease-in-out infinite;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo-lsite {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo-dot {
    color: #fbbf24;
}

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

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.made-with-love {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.heart-icon {
    color: #ef4444;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes heartbeat {
    0%, 50%, 100% { transform: scale(1); }
    5% { transform: scale(1.2); }
    10% { transform: scale(1.1); }
    15% { transform: scale(1.3); }
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
    transform: rotateY(180deg);
}

.wave-divider .shape-fill {
    fill: #FFFFFF;
}

body.dark-theme .wave-divider .shape-fill {
    fill: #121212;
}

/* Main Content */
.projects {
    padding: 4rem 0;
    background-color: white;
    position: relative;
    z-index: 1;
}

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

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    color: var(--dark);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Search and Sort */
.search-section {
    padding: 0;
    background: transparent;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--gray-light);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.stats-text {
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.stats-highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 450px;
    border: 1px solid var(--gray-light);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

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

.card-preview {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

body.dark-theme .card-preview {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.card-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover .preview-overlay {
    opacity: 1;
    background: rgba(139, 92, 246, 0.15);
}

.preview-overlay-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-visit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-visit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.favicon {
    width: 20px;
    height: 20px;
}

.project-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-active {
    background-color: #10b981;
    color: white;
}

.domain-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.ssl-badge {
    padding: 2px 8px;
    background-color: #10b981;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.tag {
    background: var(--gray-light);
    color: var(--gray);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* Loading States */
.loading-state, .error-state, .empty-state {
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--gray-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state p, .empty-state p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 450px;
    border: 1px solid var(--gray-light);
}

.skeleton-preview {
    height: 250px;
    width: 100%;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin: 1.5rem 1.5rem 1rem 1.5rem;
}

.skeleton-description {
    height: 16px;
    width: 90%;
    margin: 0 1.5rem 0.5rem 1.5rem;
}

.skeleton-description:last-of-type {
    width: 60%;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-btn {
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    background-color: var(--gray-light);
    color: var(--gray);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    font-weight: 600;
    color: var(--dark);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    height: 90%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

body.dark-theme .modal-content {
    background: #1f1f1f;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-iframe {
    width: 100%;
    flex: 1;
    border: none;
}

.modal-footer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--gray-light);
}

body.dark-theme .modal-footer {
    background: #1f1f1f;
    border-top-color: #2d2d2d;
}

.modal-description {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

body.dark-theme .modal-description {
    color: #b0b0b0;
}

.modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Thank You Section */
.thank-you-section {
    background-color: #f9f7ff;
    padding: 5rem 0;
    text-align: center;
}

.thank-you-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.thank-you-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 3rem;
}

.lamun-highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
    padding: 0 5px;
}

.lamun-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.team-member-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    position: relative;
}

.team-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
    transition: var(--transition);
}

.team-member-link:hover .team-member-avatar {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.4);
}

.team-member-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
}

.github-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: var(--dark);
    transition: var(--transition);
}

.team-member-link:hover .github-icon {
    transform: rotate(360deg);
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
}

.footer-wave {
    position: absolute;
    top: -70px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.footer-wave .shape-fill {
    fill: var(--dark);
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.footer-contact {
    margin-top: 1rem;
}

.footer-contact a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: white;
    text-decoration: underline;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: none;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Dark Theme */
body.dark-theme {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-theme .projects {
    background-color: #121212;
}

body.dark-theme .hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

body.dark-theme .logo-lsite,
body.dark-theme .app-bar-logo-text-bottom {
    color: #f5f5f5;
}

body.dark-theme .project-card,
body.dark-theme .skeleton-card {
    background: #1f1f1f;
    border-color: #2d2d2d;
}

body.dark-theme .project-title {
    color: #f5f5f5;
}

body.dark-theme .search-input {
    background: #1f1f1f;
    border-color: #2d2d2d;
    color: #f5f5f5;
}

body.dark-theme .stats-text {
    background: #1f1f1f;
    color: #f5f5f5;
}

body.dark-theme .app-bar {
    background-color: #1a1a1a;
}

body.dark-theme .app-bar-link {
    color: #b0b0b0;
}

body.dark-theme .thank-you-section {
    background-color: #1a1a1a;
}

body.dark-theme .team-member-name {
    color: #f5f5f5;
}

body.dark-theme .skeleton {
    background: linear-gradient(90deg, #2d2d2d 25%, #3d3d3d 50%, #2d2d2d 75%);
    background-size: 200% 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .logo-itsall {
        font-size: 2.5rem;
    }

    .logo-lsite {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .header-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .wave-divider svg {
        height: 60px;
    }

    .app-bar-nav {
        display: none;
    }

    .team-members {
        gap: 1.5rem;
    }

    .team-member-avatar {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 8px;
    }

    .search-input {
        border-radius: 8px 8px 0 0;
        border-right: 1px solid var(--gray-light);
    }

    .search-btn {
        border-radius: 0 0 8px 8px;
        padding: 0.8rem;
    }

    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Hidden class */
.hidden {
    display: none !important;
}
