/* ============================================
   SCRIPTS PAGE - PREMIUM ENHANCED DESIGN
   ============================================ */

/* Override body animation */
body {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* ============ HERO SECTION - ENHANCED ============ */
.scripts-hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 140px 2rem 100px;
    overflow: hidden;
    background: transparent;
}

.scripts-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.hero-content-wrapper {
    max-width: 1100px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.scripts-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -3px;
}

.title-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
}

.title-white {
    color: #ffffff;
    display: inline-block;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

.scripts-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.hero-stats-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-stats-simple strong {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.3rem;
}

/* ============ STATUS LEGEND ============ */
.status-section {
    padding: 3rem 2rem;
}

.status-legend {
    max-width: 1200px;
    margin: 0 auto;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.status-legend-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
}

.status-legend-title i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3rem;
}

.status-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.status-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.status-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.status-badge.status-working {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.status-needs-update {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.status-broken {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.status-discontinued {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.status-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============ SCRIPTS CONTROLS ============ */
.scripts-main-section {
    padding: 4rem 2rem;
}

.scripts-controls {
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.15);
    background: #111111;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Filter Container */
.filter-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn {
    padding: 0.7rem 1.3rem;
    background: #0d0d0d;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    background: #111111;
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.filter-btn i {
    font-size: 0.9rem;
}

/* ============ SCRIPTS GRID - BLACK MATTE STYLE ============ */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.script-card {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.script-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    background: #111111;
}

/* Script Image */
.script-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.script-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.script-card:hover .script-image {
    transform: scale(1.03);
}

.script-image-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.image-badge {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    backdrop-filter: blur(20px);
    border: 1.5px solid;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5px;
}

.image-badge.key-system {
    background: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
    border-color: rgba(255, 193, 7, 0.7);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.5);
}

.image-badge.free {
    background: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
}

/* Script Info - Black Matte Style */
.script-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.script-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.script-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.2px;
    flex: 1;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.script-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.author-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.author-name i {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.script-stats {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.stat-item i {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Script Actions - Horizontal Layout */
.script-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0;
    margin-top: auto;
}

.view-script-btn,
.copy-script-btn {
    padding: 0.7rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.view-script-btn {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.view-script-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.view-script-btn i {
    font-size: 0.8rem;
}

.copy-script-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.copy-script-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.copy-script-btn i {
    font-size: 0.8rem;
}

.copy-script-btn.success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
}

/* ============ SCRIPT MODAL ============ */
.script-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.script-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: #0a0a0a;
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 2rem;
    padding-right: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    background: #0a0a0a;
    z-index: 10;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    flex: 1;
}

.modal-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-status-badge.working {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-status-badge.needs-update {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.modal-status-badge.broken {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 20;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9), transparent);
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
}

.info-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-section h3 i {
    color: rgba(255, 255, 255, 0.7);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.feature-item i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.feature-item span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.script-code-wrapper {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.copy-btn.success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.script-code {
    background: #050507;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    padding-top: 3.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .scripts-title {
        font-size: 2.5rem;
    }
    
    .status-items {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        gap: 1rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        justify-content: center;
    }
    
    .scripts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .script-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .script-stats {
        margin-left: 0;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .scripts-title {
        font-size: 2rem;
        letter-spacing: -2px;
    }
    
    .scripts-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats-simple {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .script-actions {
        gap: 0.5rem;
    }
    
    .view-script-btn,
    .copy-script-btn {
        padding: 0.65rem 0.85rem;
        font-size: 0.75rem;
    }
}

/* ============ SCROLLBAR ============ */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
