* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4a7bc8;
    --primary-light: #6b9ae6;
    --primary-dark: #2c5aa0;
    --secondary: #121212;
    --accent: #00c3ff;
    --text: #e0e0e0;
    --text-light: #a0a0a0;
    --text-lighter: #707070;
    --white: #1e1e1e;
    --border: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

body {
    background: var(--secondary);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(74, 123, 200, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 107, 53, 0.05) 0%, transparent 25%);
    z-index: -1;
    pointer-events: none;
}

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    box-shadow: 0 2px 15px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.title-container {
    text-align: left;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
    color: var(--primary);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
}

.tabs {
    display: flex;
    gap: 0;
    margin-top: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

.tab {
    position: relative;
    background: var(--white);
    border: none;
    padding: 14px 28px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    z-index: 5;
    font-weight: 500;
    color: var(--text-light);
}

.tab:first-child {
    border-radius: 8px 0 0 8px;
}

.tab:last-child {
    border-radius: 0 8px 8px 0;
}

.tab.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(74, 123, 200, 0.3);
}

.tab:hover:not(.active) {
    background: #2a2a2a;
    color: var(--primary-light);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-section {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px var(--shadow);
    min-height: 500px;
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.content-section.active-section {
    display: block;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    max-width: 500px;
    margin: 2rem auto;
}

.search-input {
    width: 100%;
    padding: 14px 24px;
    background: #2a2a2a;
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.search-input::placeholder {
    color: var(--text-lighter);
}

.search-input:focus {
    box-shadow: 0 4px 15px rgba(74, 123, 200, 0.3);
    border-color: var(--primary-light);
}

.welcome-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(74, 123, 200, 0.2);
}

.welcome-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.feature-description {
    line-height: 1.6;
    color: var(--text-light);
}

.script-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.script-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid var(--border);
}

.script-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--shadow-hover);
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.script-title {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 600;
    margin-right: 1rem;
}

.script-badge {
    background: var(--accent);
    color: #121212;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.script-desc {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.script-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: #3a3a3a;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .8rem;
    transition: .2s;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.tag:hover {
    background: var(--primary-light);
    color: var(--text);
    transform: translateY(-2px);
}

.script-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text);
    box-shadow: 0 4px 10px rgba(74, 123, 200, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 123, 200, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(74, 123, 200, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 123, 200, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    margin-top: 1rem;
}

.btn-outline:hover {
    background: rgba(74, 123, 200, 0.1);
    transform: translateY(-2px);
}

.tool-card {
    text-align: center;
}

.tool-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.footer {
    background: #0a0a0a;
    padding: 40px 0;
    margin-top: 50px;
    color: var(--text);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #2a2a2a;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.popup-overlay.active .popup-content {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.popup-close:hover {
    color: var(--primary);
}

.popup-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.popup-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.popup-badge {
    display: inline-block;
    background: var(--accent);
    color: #121212;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.popup-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.popup-details {
    margin-bottom: 2rem;
}

.popup-details h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.popup-details ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.popup-details li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.popup-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

::selection {
    background: rgba(74, 123, 200, 0.3);
    color: var(--text);
}

::-moz-selection {
    background: rgba(74, 123, 200, 0.3);
    color: var(--text);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .title-container {
        text-align: center;
    }

    .title {
        font-size: 2.2rem;
    }

    .tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tab {
        flex: 1;
        min-width: 140px;
        padding: 12px 20px;
        border-radius: 8px !important;
        margin: 2px;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .content-section {
        padding: 25px;
        margin: 0;
    }

    .feature-grid,
    .script-list {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .script-actions {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .welcome-content {
        padding: 2rem;
    }

    .popup-content {
        padding: 1.5rem;
    }

    .popup-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .feature-card,
    .script-card {
        padding: 1.5rem;
    }

    .welcome-content {
        padding: 1.5rem;
    }
}

/* Home Page Animations */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: titleGlow 3s ease-in-out infinite;
}

.cypher-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.animated-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.grid-item {
    background: rgba(42, 42, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.grid-item:hover {
    transform: translateY(-5px);
    background: rgba(42, 42, 42, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.grid-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-glow {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Floating Code Animation */
.floating-code {
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00ff00;
    animation: float 6s ease-in-out infinite;
}

.code-line {
    margin-bottom: 0.5rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 30%;
    animation-delay: 6s;
}

/* Terminal Window */
.terminal-window {
    background: #0a0a0a;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    animation: terminalGlow 4s ease-in-out infinite;
}

.terminal-header {
    background: #1a1a1a;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2a2a2a;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-btn.red {
    background: #ff5f56;
}

.terminal-btn.yellow {
    background: #ffbd2e;
}

.terminal-btn.green {
    background: #27c93f;
}

.terminal-title {
    color: #ccc;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 0.5rem;
    animation: typewriter 0.5s ease-out;
}

.terminal-line:nth-child(1) {
    animation-delay: 0.5s;
}

.terminal-line:nth-child(2) {
    animation-delay: 1s;
}

.terminal-line:nth-child(3) {
    animation-delay: 1.5s;
}

.blinking {
    animation: blink 1s infinite;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(74, 123, 200, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(74, 123, 200, 0.8), 0 0 40px rgba(74, 123, 200, 0.6);
    }
}

@keyframes terminalGlow {
    0%, 100% {
        box-shadow: 0 20px 40px rgba(74, 123, 200, 0.2);
    }
    50% {
        box-shadow: 0 20px 40px rgba(74, 123, 200, 0.4);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .floating-code {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 2rem;
    }

    .animated-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .animated-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .hero-title {
        font-size: 2rem;
    }
}
