/* WebFX Examples - Modern Minimalist Design */

/* Hero Section */
.examples-hero {
    padding: 140px 0 60px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.05) 0%, transparent 50%);
}

.examples-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.examples-hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filters & Search */
.filters-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: none;
    border-radius: 12px;
    background: var(--bg-surface);
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: white;
    box-shadow: 0 0 0 2px var(--primary);
}

.filter-tags {
    display: flex;
    gap: 8px;
    padding: 0 8px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tag {
    padding: 8px 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Content Grid */
.examples-content {
    padding: 80px 0;
}

.category-group {
    margin-bottom: 60px;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-left: 16px;
    border-left: 4px solid var(--primary);
}

.grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

/* Animation Card */
.anim-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    position: relative;
}

.anim-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.anim-preview {
    height: 200px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-box {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.anim-info {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.anim-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Modal Styles (Preserved & Enhanced) */
.code-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

    .filters-container {
        padding: 16px;
    }

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

/* Blue accent */

/* Blue accent fix - Change to Primary */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

/* View Code Button */
.btn-view-code {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-view-code:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Premium Modal Styles */
.code-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.code-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.5);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

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

.code-tabs {
    display: flex;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.3);
}

.tab-btn {
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary);
}

.code-content {
    position: relative;
    flex: 1;
    overflow: auto;
    background: #0d1117;
    padding: 24px;
    margin: 0;
}

.code-content pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e6edf3;
}

.btn-copy {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e6edf3;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Dark Mode Overrides */
.dark-mode .modal-content {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .modal-header {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .code-tabs {
    background: rgba(30, 41, 59, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode .btn-view-code {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.dark-mode .btn-view-code:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Scrollbar Styling */
.code-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.code-content::-webkit-scrollbar-track {
    background: #0d1117;
}

.code-content::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 5px;
    border: 2px solid #0d1117;
}

.code-content::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes flipIn {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }

    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

@keyframes wobble {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-25px) rotate(-5deg);
    }

    30% {
        transform: translateX(20px) rotate(3deg);
    }

    45% {
        transform: translateX(-15px) rotate(-3deg);
    }

    60% {
        transform: translateX(10px) rotate(2deg);
    }

    75% {
        transform: translateX(-5px) rotate(-1deg);
    }
}

/* Animation Helper Classes */
.fadeIn {
    animation-name: fadeIn;
}

.fadeOut {
    animation-name: fadeOut;
}

.scaleIn {
    animation-name: scaleIn;
}

.rotate {
    animation-name: rotate;
}

.slideIn {
    animation-name: slideIn;
}

.slideOut {
    animation-name: slideOut;
}

.bounceIn {
    animation-name: bounceIn;
}

.zoomIn {
    animation-name: zoomIn;
}

.flipIn {
    animation-name: flipIn;
}

.pulse {
    animation-name: pulse;
}

.shake {
    animation-name: shake;
}

.wobble {
    animation-name: wobble;
}

/* Responsive */
@media (max-width: 768px) {
    .examples-hero h1 {
        font-size: 2rem;
    }

    .animations-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Dark Mode Support for Examples */
.dark-mode .examples-hero {
    background: radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.05) 0%, transparent 50%);
}

.dark-mode .filters-container {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.dark-mode .search-input {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-main);
}

.dark-mode .search-input:focus {
    background: #0f172a;
}

.dark-mode .filter-tag {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.dark-mode .filter-tag:hover,
.dark-mode .filter-tag.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.dark-mode .anim-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .anim-preview {
    background: #0f172a;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.dark-mode .anim-info {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.dark-mode .btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.dark-mode .modal-content {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .code-content {
    background: #0d1117;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}