.portfolio-premium {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
    min-height: 100vh;
}

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

.portfolio-main-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.portfolio-main-title svg {
    color: #ffd700;
}

.filter-container {
    margin-bottom: 48px;
    display: flex;
    justify-content: center;
}

.filter-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
    background: linear-gradient(135deg, #1e1e25 0%, #2a2a35 100%);
    border-radius: 20px;
    border: 1px solid #2a2a35;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #a0a0b0;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-pill:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffffff;
}

.filter-pill.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #14141a;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.pill-count {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.filter-pill.active .pill-count {
    background: rgba(0,0,0,0.2);
    color: #14141a;
}

.filter-pill:not(.active) .pill-count {
    background: rgba(255,255,255,0.1);
}

.cards-grid-premium {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    perspective: 1500px;
    margin-bottom: 48px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .cards-grid-premium {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.card-wrapper {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.card-wrapper[style*="display: block"] {
    opacity: 1;
    transform: translateY(0);
}

.card-3d {
    position: relative;
    width: 100%;
    height: 450px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d.flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #2a2a35;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    transition: box-shadow 0.3s ease;
}

.card-3d:hover .card-front {
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2);
}

.card-front {
    background: linear-gradient(135deg, #1e1e25 0%, #2a2a35 100%);
}

.card-back {
    background: linear-gradient(135deg, #1e1e25 0%, #2a2a35 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-3d:hover .card-image-container img {
    transform: scale(1.1);
}

.card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.8) 100%);
}

.card-category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    background: rgba(255, 215, 0, 0.9);
    color: #14141a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.card-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.card-desc {
    font-size: 13px;
    color: #a0a0b0;
    margin: 0;
    line-height: 1.5;
}

.card-tech-preview {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mini-tech {
    padding: 4px 10px;
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.card-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-action span {
    font-size: 13px;
    color: #a0a0b0;
}

.card-action svg {
    color: #ffd700;
    transition: transform 0.3s ease;
}

.card-3d:hover .card-action svg {
    transform: translateX(4px);
}

.back-content {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.back-icon {
    color: #ffd700;
    opacity: 0.8;
}

.back-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.back-content p {
    font-size: 14px;
    color: #a0a0b0;
    line-height: 1.6;
    margin: 0;
}

.view-details-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #14141a;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.pagination-premium {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
}

.page-arrow {
    width: 48px;
    height: 48px;
    border: 2px solid #2a2a35;
    background: linear-gradient(135deg, #1e1e25 0%, #2a2a35 100%);
    color: #a0a0b0;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.page-arrow:hover:not(:disabled) {
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-2px);
}

.page-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-numbers-premium {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-num-premium {
    width: 48px;
    height: 48px;
    border: 2px solid #2a2a35;
    background: linear-gradient(135deg, #1e1e25 0%, #2a2a35 100%);
    color: #a0a0b0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-num-premium:hover {
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-2px);
}

.page-num-premium.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #14141a;
    border-color: #ffd700;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.page-ellipsis-premium {
    color: #a0a0b0;
    font-size: 16px;
    padding: 0 4px;
}

/* FULLSCREEN MODAL - Positioned fixed to viewport */
.modal-overlay-premium {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    cursor: auto;
}

body.modal-open {
    cursor: auto;
}

body.modal-open .cursor-dot,
body.modal-open .cursor-ring {
    display: none !important;
}

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

.modal-container-premium {
    background: linear-gradient(135deg, #1e1e25 0%, #2a2a35 100%);
    border-radius: 24px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #3a3a45;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 215, 0, 0.15);
    transform: scale(0.85) translateY(40px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay-premium.active .modal-container-premium {
    transform: scale(1) translateY(0);
}

/* Hide scrollbar in modal */
.modal-container-premium::-webkit-scrollbar {
    width: 0;
    display: none;
}

.modal-container-premium {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-close-premium {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #a0a0b0;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 99999999;
    backdrop-filter: blur(8px);
}

.modal-close-premium:hover {
    background: #ff4757;
    color: white;
    transform: rotate(90deg);
}

.modal-body-premium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image-section {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.modal-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.modal-badge-premium {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #14141a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
}

.modal-details-section {
    padding: 48px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
}

.modal-details-section::-webkit-scrollbar {
    width: 0;
    display: none;
}

.modal-title-premium {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.modal-description-premium h4,
.modal-tech-premium h4,
.modal-features-premium h4 {
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
}

.modal-description-premium p {
    font-size: 15px;
    color: #a0a0b0;
    line-height: 1.7;
    margin: 0;
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-tech-tag-premium {
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.modal-features-premium ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-features-premium li {
    font-size: 14px;
    color: #a0a0b0;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.modal-features-premium li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50%;
}

.modal-actions-premium {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.premium-btn.primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #14141a;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.premium-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.5);
}

.premium-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 2px solid #3a3a45;
}

.premium-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffd700;
    transform: translateY(-3px);
}

@media (max-width: 1024px) {
    .modal-body-premium {
        grid-template-columns: 1fr;
    }
    
    .modal-image-section {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .portfolio-premium {
        padding: 32px 16px;
    }
    
    .portfolio-main-title {
        font-size: 28px;
    }
    
    .cards-grid-premium {
        grid-template-columns: 1fr;
    }
    
    .card-3d {
        height: 400px;
    }
    
    .modal-details-section {
        padding: 32px 24px;
    }
    
    .modal-title-premium {
        font-size: 28px;
    }
    
    .modal-actions-premium {
        flex-direction: column;
    }
    
    .premium-btn {
        width: 100%;
        justify-content: center;
    }
}
