* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #000000;
    --text-secondary: #666666;
    --border: #e5e5e5;
    --card-bg: #fafafa;
    --hover-bg: #f0f0f0;
    --nav-bg: rgba(255, 255, 255, 0.8);
}

body.dark-mode {
    --bg: #000000;
    --text: #ffffff;
    --text-secondary: #999999;
    --border: #333333;
    --card-bg: #111111;
    --hover-bg: #1a1a1a;
    --nav-bg: rgba(0, 0, 0, 0.8);
}

body {
    font-family: 'Courier New', monospace;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

.icon {
    width: 24px;
    height: 24px;
}

.hidden {
    display: none !important;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

.language-select {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s;
}

.language-select:hover {
    background: var(--hover-bg);
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--hover-bg);
}

/* Hero */
.hero {
    padding: 10rem 2rem 6rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: bold;
    letter-spacing: -0.05em;
    line-height: 1;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Scripts Section */
.scripts-section {
    padding: 5rem 2rem;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: bold;
}

.comment {
    color: var(--text-secondary);
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--hover-bg);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-container {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.script-card {
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.4;
    display: flex;
    flex-direction: column;
}

.script-card.active {
    opacity: 1;
}

.script-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-image {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image svg {
    width: 4rem;
    height: 4rem;
    color: #333;
    transition: transform 0.3s;
}

.script-card:hover .card-image svg {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: bold;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.card-price {
    font-size: 1.5rem;
    font-weight: bold;
}

.view-btn {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    background: var(--hover-bg);
}

/* Features */
.features-section {
    padding: 5rem 2rem;
    border-top: 1px solid var(--border);
}

.features-section h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Footer */
footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Modal Compatto */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    padding: 2rem;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content-compact {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    max-width: 1000px;
    width: 100%;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--hover-bg);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: #ff0000;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

/* Galleria Sinistra */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 0.75rem;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-container {
    width: 100%;
    height: 100%;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main:hover .gallery-btn {
    opacity: 1;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

.gallery-btn svg {
    color: white;
}

.image-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.thumbnail {
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.5;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.active {
    border-color: var(--text);
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.video-thumb::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.3);
}

/* Info Destra */
.modal-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-info h2 {
    font-size: 1.75rem;
    font-weight: bold;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.modal-info h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 1rem;
}

.features-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.features-list::-webkit-scrollbar {
    width: 4px;
}

.features-list::-webkit-scrollbar-track {
    background: var(--card-bg);
}

.features-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.features-list li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.features-list li::before {
    content: '→';
    color: var(--text);
    flex-shrink: 0;
}

.modal-footer-compact {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-price {
    font-size: 2rem;
    font-weight: bold;
}

.purchase-btn {
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.purchase-btn:hover {
    transform: scale(1.05);
}

/* Purchase Modal - Discord */
.purchase-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    padding: 2rem;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.purchase-modal.active {
    display: flex;
}

.purchase-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: slideUp 0.4s ease;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.purchase-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--hover-bg);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.purchase-modal-close:hover {
    background: #ff0000;
}

.purchase-modal-body {
    padding: 2rem 1.5rem;
}

.discord-icon-container {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(88, 101, 242, 0);
    }
}

.discord-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.purchase-modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.purchase-modal-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.purchase-info-box {
    background: var(--hover-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.purchase-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.purchase-info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.info-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-text strong {
    color: var(--text);
    font-weight: bold;
}

.discord-btn {
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.discord-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(88, 101, 242, 0.3);
}

.discord-btn svg {
    width: 24px;
    height: 24px;
}

.purchase-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.purchase-steps {
    text-align: left;
    margin-bottom: 1.5rem;
}

.purchase-steps h3 {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-align: center;
}

.step {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--hover-bg);
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.step:hover {
    background: var(--card-bg);
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--text);
    color: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.step-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.purchase-price-display {
    background: var(--hover-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.price-amount {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(:last-of-type) {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-footer-compact {
        flex-direction: column;
        gap: 1rem;
    }

    .purchase-btn {
        width: 100%;
    }

    .purchase-modal-content {
        max-width: 100%;
    }

    .purchase-modal-body {
        padding: 2rem 1.5rem;
    }

    .purchase-modal-title {
        font-size: 1.5rem;
    }

    .discord-btn {
        width: 100%;
        justify-content: center;
    }
}