* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0d1621 0%, #1a2435 100%);
    color: #e0e9f4;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 60px;
    position: relative;
}

/* Header Styles */
.header {
    background: rgba(13, 22, 33, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #4a9de2;
    font-size: 1.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.logo i {
    margin-right: 10px;
    color: #4a9de2;
}

.logo:hover {
    color: #6bb5ff;
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: #a4c2e8;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(74, 157, 226, 0.15);
    color: #4a9de2;
}

.back-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #95a5a6;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 4px;
    background: rgba(149, 165, 166, 0.1);
    transition: all 0.3s ease;
}

.back-btn i {
    margin-right: 8px;
}

.back-btn:hover {
    background: rgba(149, 165, 166, 0.2);
    color: #fff;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.page-title h1 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-title p {
    font-size: 1.2rem;
    color: #a4c2e8;
    max-width: 700px;
    margin: 0 auto;
}

.page-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #4a9de2, #9d6de2);
    margin: 25px auto;
    border-radius: 2px;
}

/* Script Directory */
.script-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.script-card {
    background: rgba(26, 36, 53, 0.8);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(74, 157, 226, 0.1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.script-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(74, 157, 226, 0.2);
    border-color: rgba(74, 157, 226, 0.3);
}

.script-header {
    padding: 20px;
    background: rgba(13, 22, 33, 0.7);
    border-bottom: 1px solid rgba(74, 157, 226, 0.1);
}

.script-header h3 {
    font-size: 1.4rem;
    color: #4a9de2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.script-header h3 i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.script-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #95a5a6;
    margin-top: 10px;
}

.script-meta span {
    display: flex;
    align-items: center;
}

.script-meta i {
    margin-right: 5px;
}

.script-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.script-description {
    margin-bottom: 20px;
    color: #c5d4eb;
    flex-grow: 1;
}

.script-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.action-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.view-btn {
    background: linear-gradient(135deg, #4a9de2 0%, #3a8dd2 100%);
    color: white;
}

.view-btn:hover {
    background: linear-gradient(135deg, #3a8dd2 0%, #2a7dc2 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 141, 210, 0.3);
}

.copy-btn {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.copy-btn:hover {
    background: rgba(46, 204, 113, 0.25);
    transform: translateY(-2px);
}

.download-btn {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

.download-btn:hover {
    background: rgba(155, 89, 182, 0.25);
    transform: translateY(-2px);
}

/* Script Detail View */
.script-detail {
    display: none;
    background: rgba(26, 36, 53, 0.95);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 157, 226, 0.2);
}

.script-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(74, 157, 226, 0.1);
}

.script-detail-header h2 {
    font-size: 1.8rem;
    color: #4a9de2;
}

.close-btn {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(231, 76, 60, 0.25);
    transform: rotate(90deg);
}

.code-container {
    position: relative;
    margin-top: 20px;
}

.code-header {
    background: rgba(13, 22, 33, 0.7);
    padding: 12px 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-actions {
    display: flex;
    gap: 10px;
}

.code-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-code {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.copy-code:hover {
    background: rgba(46, 204, 113, 0.25);
}

.download-code {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

.download-code:hover {
    background: rgba(155, 89, 182, 0.25);
}

pre {
    margin: 0;
    border-radius: 0 0 8px 8px;
}

code.hljs {
    border-radius: 0 0 8px 8px;
    padding: 20px !important;
    font-family: 'Source Code Pro', monospace;
    font-size: 15px;
    max-height: 500px;
    overflow: auto;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(74, 157, 226, 0.1);
}

.footer p {
    color: #95a5a6;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .script-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .header {
        justify-content: space-between;
    }

    .page-title h1 {
        font-size: 2.2rem;
    }

    .script-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .script-grid {
        grid-template-columns: 1fr;
    }

    .page-title h1 {
        font-size: 1.8rem;
    }
}

.script-category {
	margin-bottom: 3rem;
}

.script-category h2 {
	font-size: 1.8rem;
	margin-bottom: 1rem;
	border-bottom: 2px solid #444;
	padding-bottom: 0.5rem;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.script-category h2::after {
	content: '\f078'; /* FontAwesome chevron-down */
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	transition: transform 0.3s;
}

.script-category.collapsed h2::after {
	transform: rotate(-90deg); /* point right when collapsed */
}

.script-grid {
	display: none; /* start collapsed */
	transition: max-height 0.3s ease;
}

.return-top {
	display: block;
	margin: 2rem auto 0;
	padding: 0.6rem 1.2rem;
	font-size: 1rem;
	background-color: #444;
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.3s;
}

.return-top:hover {
	background-color: #666;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

/* Search Bar */
.search-container {
    margin-bottom: 1rem;
    text-align: center;
}

#scriptSearch {
    width: 90%;
    max-width: 400px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Releases Section */
.flagship_releases {
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(26, 36, 53, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(157, 109, 226, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flagship_releases h2 {
    font-size: 2rem;
    color: #ffcc66;
    border-bottom: 2px solid #ffcc66;
    padding-bottom: 0.6rem;
}

.flagship_releases .category-description {
    font-size: 1rem;
    color: #c5d4eb;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
}

.flagship_releases .script-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
