:root {
    /* AstroBin-inspired Black & Orange Palette */
    --bg-color: #000000;
    --bg-secondary: #0f0f0f;
    --text-color: #e0e0e0;
    --text-muted: #999999;
    --accent-primary: #f39c12;
    /* Distinctive Orange */
    --accent-secondary: #d35400;
    /* Darker Orange */
    --accent-cyan: #f39c12;
    /* Mapped to orange for consistency with request */
    --accent-glow: rgba(243, 156, 18, 0.2);
    --card-bg: #1c1c1c;
    --border-color: #333333;
    --nav-bg: rgba(0, 0, 0, 0.95);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    background-color: var(--bg-color);
    /* Move background here to allow z-index layering */
}

body {
    background-color: transparent;
    /* Make body transparent so particles (z-index -1) are visible */
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: auto;
    line-height: 1.6;
}

/* Page Transitions */
body {
    opacity: 1;
    transition: opacity 0.5s ease;
}

body.fade-out {
    opacity: 0;
}

/* Content Float In Animation */
.float-in {
    animation: floatIn 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Background Canvas - Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* filter: blur(2px); Removed for performance */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    color: var(--accent-primary);
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
    cursor: pointer;
}

a:hover {
    color: var(--accent-primary);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 40px 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    color: #fff;
    /* Removed gradient text for logo to be cleaner white/orange */
}

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

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
    color: var(--text-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 60px;
    background: radial-gradient(circle at center, rgba(243, 156, 18, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

.hero h1 {
    text-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.hero h1 span {
    display: block;
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero p {
    max-width: 600px;
    margin: 20px auto;
    font-size: 1.2rem;
    opacity: 0.8;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    margin-top: 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-primary);
    z-index: -1;
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn:hover {
    color: #000;
    /* Black text on orange background */
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.3);
}

.btn:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.btn:hover::before {
    width: 100%;
}

.btn-outline {
    display: inline-block;
    padding: 14px 35px;
    border: 1px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
}

.btn-outline:hover {
    background: rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.1);
    color: #fff;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 350px));
    gap: 30px;
    justify-content: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

/* Card Style */
.card {
    background: rgba(28, 28, 28, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border-color: var(--accent-primary);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}


/* Feature Cards */
.feature-card {
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(31, 111, 235, 0.1);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
footer {
    background: rgba(15, 15, 15, 0.7);
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 300px;
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-bottom a:hover {
    opacity: 0.8;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1001;
}

.hamburger-inner {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    top: 8px;
}

.hamburger.active .hamburger-inner {
    background-color: transparent;
}

.hamburger.active .hamburger-inner::before {
    top: 0;
    transform: rotate(45deg);
    background-color: var(--accent-primary);
}

.hamburger.active .hamburger-inner::after {
    top: 0;
    transform: rotate(-45deg);
    background-color: var(--accent-primary);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    backdrop-filter: none;
    /* Removed blur */
}

.mobile-nav-overlay.active {
    display: block;
}

/* Stats Section */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding: 40px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Typography */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .container {
        padding: 0 40px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile & Tablet */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 20px;
    }

    .section {
        padding: 60px 0;
    }

    h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    /* Navigation */
    .nav-container {
        justify-content: space-between !important;
        padding: 0 35px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(13, 17, 23, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 80px;
        transition: right 0.4s ease;
        z-index: 999;
        border-left: 1px solid var(--border-color);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 25px 0;
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .hero {
        padding: 100px 20px 60px;
        text-align: center;
    }

    .hero h1 span {
        display: block;
        margin-top: 5px;
    }

    .section-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-brand p {
        margin: 0 auto 20px;
    }

    .stats-container {
        gap: 40px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Resize TStar Logo on Mobile */
    .tstar-logo {
        width: 50% !important;
        max-width: 180px;
    }

    /* Detail Pages Grid (Text + Tech Data) - Adapted for 1fr 2fr */
    .grid-3[style*="1fr 2fr"] {
        display: flex !important;
        flex-direction: column;
        gap: 40px !important;
    }
}

/* Glow Effects */
.glow-box {
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.2);
}

/* Image overflow container */
.image-overflow {
    overflow: hidden;
    border-radius: 12px;
}

/* Software Logo */
.tstar-logo {
    width: 60%;
    max-width: 200px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(243, 156, 18, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tstar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(243, 156, 18, 0.7));
}

/* Software Logo Float Layout (for pages/software.html) */
.tstar-float-logo {
    width: 225px;
    /* Reduced by half from 450px */
    max-width: 22.5%;
    /* Reduced by half from 45% */
    float: left;
    margin: 0 40px 20px 0;
    border-radius: 15px;
}

@media (max-width: 768px) {
    .tstar-float-logo {
        float: none;
        width: 100%;
        max-width: 100%;
        display: block;
        margin: 0 auto 30px auto;
    }
}

/* Software Page Specific Styles */
.software-panoramica-h2 {
    text-align: left;
    margin-bottom: 25px;
    color: var(--accent-cyan);
}

/* Text Alignment Utilities */
.text-justify {
    text-align: justify;
}

.text-center {
    text-align: center;
}

@media (max-width: 768px) {
    .software-panoramica-h2 {
        text-align: center;
    }
}