/* Projects Page Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.projects-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

/* Search Section */
.search-section {
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-input {
    width: 100%;
    padding: 14px 45px 14px 48px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #667eea;
    background: white;
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
}

/* Sort Section */
.sort-section {
    margin-bottom: 30px;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.8);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-options select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.view-options {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Projects Container */
.projects-container {
    transition: all 0.3s ease;
}

/* Grid View */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

/* List View */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-view .project-card {
    display: flex;
    gap: 25px;
    padding: 25px;
}

.list-view .project-image {
    width: 120px;
    height: 120px;
    margin: 0;
}

.list-view .project-content {
    flex: 1;
}

/* Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.5s ease backwards;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image i {
    font-size: 56px;
    color: white;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image i {
    transform: scale(1.1);
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.featured-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    left: 15px;
    right: auto;
}

/* Project Content */
.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 8px;
}

.project-short-desc {
    font-size: 13px;
    color: #667eea;
    margin-bottom: 12px;
    font-weight: 500;
}

.project-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Technologies */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #667eea;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: #667eea;
    color: white;
}

/* Project Stats */
.project-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.project-stats i {
    color: #667eea;
}

/* GitHub Stats */
.github-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.github-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.github-stat i {
    color: #667eea;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-link:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.github-link {
    background: #24292e;
}

.github-link:hover {
    background: #2c3e50;
}

.demo-link {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.demo-link:hover {
    background: #667eea;
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.project-modal .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-modal .modal-header h3 {
    font-size: 24px;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 25px;
}

.modal-full-description {
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
    white-space: pre-line;
}

.modal-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.modal-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.modal-detail-item:last-child {
    border-bottom: none;
}

.modal-detail-label {
    font-weight: 600;
    color: #333;
}

.modal-detail-value {
    color: #666;
}

.modal-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    grid-column: 1 / -1;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    grid-column: 1 / -1;
}

.empty-message i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-message h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.empty-message p {
    color: #666;
    margin-bottom: 25px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 32px;
    }
    
    .grid-view {
        grid-template-columns: 1fr;
    }
    
    .list-view .project-card {
        flex-direction: column;
    }
    
    .list-view .project-image {
        width: 100%;
        height: 150px;
    }
    
    .results-info {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .sort-options {
        flex-wrap: wrap;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}