/* Component CSS - Specialized components */

/* Advanced GIF Showcase */
.gif-showcase {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    margin: 3rem 0;
    backdrop-filter: blur(10px);
}

.gif-showcase h3 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gif-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.gif-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.gif-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.gif-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 2rem;
}

.gif-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gif-item:hover .gif-media {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.05);
}

.gif-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0;
}

.gif-item:hover .gif-overlay {
    opacity: 1;
}

.control-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: white;
    transform: scale(1.1);
}

.gif-content {
    padding: 1.5rem;
}

.gif-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.gif-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.gif-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Fullscreen Modal */
.gif-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-backdrop {
    background: rgba(0, 0, 0, 0.9);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

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

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--accent-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

/* Stats Grid (if needed) */
.stats-container {
    margin-top: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Implementation Steps Component */
.implementation-steps {
    margin-top: 1.5rem;
}

.steps-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.step-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: left 0.5s ease;
}

.step-btn:hover::before {
    left: 100%;
}

.step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.step-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.step-content-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.step-gif-viewer {
    width: 100%;
    height: 400px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-gif-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.step-description {
    display: none;
}

.step-description h4 {
    display: none;
}

.step-description p {
    display: none;
}

/* GitHub Access Section */
.github-access-section {
    margin-top: 2rem;
    text-align: center;
}

.github-access-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #24292e 0%, #000000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.github-access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #000000 0%, #24292e 100%);
}

.github-access-btn:active {
    transform: translateY(0);
}

.github-access-btn svg {
    flex-shrink: 0;
}

/* Responsive design for steps */
@media (max-width: 768px) {
    .steps-buttons {
        flex-direction: column;
    }

    .step-btn {
        width: 100%;
    }

    .step-gif-viewer {
        height: 250px;
    }

    .step-content-container {
        padding: 1rem;
    }

    .github-access-btn {
        width: 100%;
        justify-content: center;
    }
}