/* Prototypes Page Styles */
:root {
    --indigo-600: #4f46e5;
    --purple-600: #7c3aed;
    --pink-600: #ec4899;
    --sky-400: #38bdf8;
    --emerald-500: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --red-500: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #e0e7ff 100%);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: white;
    padding: 8rem 1rem;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

.hero-blur-elements {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    overflow: hidden;
}

.blur-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.blur-circle-1 {
    top: 2.5rem;
    left: 5%;
    width: 16rem;
    height: 16rem;
    background: white;
}

.blur-circle-2 {
    bottom: 2.5rem;
    right: 5%;
    width: 20rem;
    height: 20rem;
    background: var(--sky-400);
}

.hero-container {
    position: relative;
    z-index: 10;
    max-width: 72rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge i {
    font-size: 1rem;
    color: #bae6fd;
}

.badge-text {
    color: #bae6fd;
    font-weight: 600;
    font-size: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-description {
    font-size: 1.25rem;
    color: #c7d2fe;
    max-width: 48rem;
    margin: 0 auto;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.5rem;
    }
}

/* Stats Section */
.stats-section {
    background: white;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-top: -2rem;
    position: relative;
    z-index: 20;
    border-radius: 1rem 1rem 0 0;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        padding: 2.5rem 1rem;
    }
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.1);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-item:nth-child(1) .stat-number {
    color: var(--indigo-600);
}

.stat-item:nth-child(2) .stat-number {
    color: var(--purple-600);
}

.stat-item:nth-child(3) .stat-number {
    color: var(--sky-400);
}

.stat-item:nth-child(4) .stat-number {
    color: var(--emerald-500);
}

.stat-label {
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Prototypes Section */
.prototypes-section {
    padding: 5rem 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--gray-800);
}

.section-title i {
    color: var(--indigo-600);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-700);
    max-width: 48rem;
    margin: 0 auto;
    line-height: 1.7;
}

/* States */
.loading-state,
.empty-state,
.error-state {
    text-align: center;
    padding: 4rem 1rem;
}

.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--indigo-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.25rem;
    color: var(--gray-700);
}

.empty-state i,
.error-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3,
.error-state h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.empty-state p,
.error-state p {
    font-size: 1.125rem;
    color: var(--gray-700);
    max-width: 36rem;
    margin: 0 auto;
}

.empty-state i {
    color: var(--gray-400);
}

.error-state {
    max-width: 36rem;
    margin: 0 auto;
    background: #fee2e2;
    border-left: 4px solid var(--red-500);
    padding: 2rem;
    border-radius: 0.75rem;
}

.error-state i {
    color: var(--red-500);
}

/* Prototypes Grid */
.prototypes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .prototypes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .prototypes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.prototype-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-100);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prototype-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.prototype-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.prototype-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.prototype-card:hover .prototype-thumbnail img {
    transform: scale(1.1);
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}

.prototype-card:hover .thumbnail-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.play-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-900);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.play-btn:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.external-btn {
    width: 2.75rem;
    height: 2.75rem;
    background: var(--indigo-600);
    color: white;
    border: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.external-btn:hover {
    background: #4338ca;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.video-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(to right, var(--indigo-600), var(--purple-600));
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-index {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--indigo-600);
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.prototype-content {
    padding: 1.5rem;
}

.prototype-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prototype-description {
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prototype-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.tech-tags {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-500);
}

.tech-tags i {
    font-size: 1rem;
}

.view-btn {
    background: none;
    border: none;
    color: var(--indigo-600);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.view-btn:hover {
    color: #4338ca;
    transform: translateX(2px);
}

.view-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.view-btn:hover i {
    transform: translateX(2px);
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.video-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 60rem;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to right, var(--indigo-600), var(--purple-600));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 0;
}

.video-container {
    position: relative;
    aspect-ratio: 16/9;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-description {
    padding: 1.5rem;
    background: var(--gray-50);
    color: var(--gray-700);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .overlay-content {
        flex-direction: column;
    }
    
    .play-btn {
        width: 100%;
    }
}

/* Animation delays for staggered animation */
.prototype-card:nth-child(1) { animation-delay: 0.1s; }
.prototype-card:nth-child(2) { animation-delay: 0.2s; }
.prototype-card:nth-child(3) { animation-delay: 0.3s; }
.prototype-card:nth-child(4) { animation-delay: 0.4s; }
.prototype-card:nth-child(5) { animation-delay: 0.5s; }
.prototype-card:nth-child(6) { animation-delay: 0.6s; }

/* Body padding for fixed navbar */
body {
    padding-top: 64px;
}

@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }
}