﻿* {
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    color: white;
    background-color: #121316;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Navigation Styles */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 19, 22, 0.9);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 12px 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.nav-scrolled {
    padding: 6px 0;
    background: rgba(18, 19, 22, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo img {
    height: 30px;
    width: auto;
    filter: none;
}

.logo span {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    max-width: 200px;
    opacity: 1;
}

.nav-scrolled .logo span {
    max-width: 0;
    opacity: 0;
    margin-left: -5px;
    pointer-events: none;
}

.logo:hover {
    color: white;
    text-shadow: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
}

nav a {
    color: #10b981;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}

nav a:hover {
    color: white;
    text-shadow: none;
    transform: translateY(-2px);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a.dropbtn {
    margin: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(10, 10, 10, 0.95);
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
    z-index: 1001;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 0;
}

.dropdown-content a {
    color: #10b981;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    margin: 0;
    text-align: center;
}

.dropdown-content a:hover {
    background-color: rgba(16, 185, 129, 0.1);
    transform: none;
}

@media (hover: hover) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.dropdown.open .dropdown-content {
    display: block;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: #10b981;
    margin: 3px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Sections */
.section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

#home {
    background-color: #121316;
}

#stats {
    background-color: #121316;
}

#weather {
    background-color: #121316;
}

#logs {
    background-color: #121316;
}

#control {
    background-color: #121316;
}

#astronomy {
    background-color: #16181d;
    height: auto;
    min-height: 100vh;
    padding: 90px 0 50px 0;
}

#games {
    background-color: #121316;
    height: auto;
    min-height: 100vh;
    padding: 90px 0 50px 0;
}

.card {
    background: #181a20; border: 1px solid #282b33;
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    max-width: 550px;
    width: 90%;
    margin: 20px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#astronomy .card,
#games .card {
    max-width: 860px;
    width: 92%;
    padding: 30px 25px;
}

/* Hub Grid & Kártyák (Csillagászat & Játékok szekciók) */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 15px;
    box-sizing: border-box;
}

.hub-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #1c1f26; border: 1px solid #2c303a;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    text-align: left;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hub-card:hover {
    transform: translateY(-3px);
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.hub-card:active {
    transform: scale(0.98);
}

.hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.hub-icon svg,
.hub-icon i {
    width: 24px;
    height: 24px;
}

.hub-card:hover .hub-icon {
    background: #10b981;
    color: #061113;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.6);
}

.hub-info {
    flex: 1;
    min-width: 0;
}

.hub-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hub-desc {
    font-size: 0.82rem;
    color: #9cb1b5;
    line-height: 1.4;
    margin: 0;
}

.hub-arrow {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    color: #10b981;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.hub-card:hover .hub-arrow {
    opacity: 1;
    transform: translateX(4px);
}

@media screen and (max-width: 600px) {
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hub-card {
        padding: 14px 14px;
    }

    #astronomy .card,
    #games .card {
        padding: 20px 14px;
        width: 95%;
    }
}

.data-box {
    color: #10b981;
    font-family: monospace;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    line-height: 1.6;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.log-box {
    color: #ff5555;
    font-family: monospace;
    font-size: 0.9rem;
    background: #181a20; border: 1px solid #282b33;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 85, 85, 0.2);
}

.info-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    padding: 5px 0;
}

.value {
    color: #10b981;
    font-weight: bold;
}

#live-data {
    text-align: center;
    font-size: 1.2rem;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    nav {
        padding: 8px 0;
        height: 50px;
        box-sizing: border-box;
    }
    
    nav.nav-scrolled {
        padding: 4px 0;
        height: 42px;
    }

    .nav-container {
        justify-content: space-between;
        height: 100%;
    }

    .logo {
        display: flex;
    }

    .section {
        height: auto;
        min-height: 100vh;
        padding: 70px 0 30px 0;
        background-attachment: scroll;
    }

    .card {
        padding: 20px 15px;
        width: 92%;
    }

    #home h1 {
        font-size: 2.2rem !important;
    }

    .menu-toggle {
        display: flex;
        z-index: 1002;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: calc(100vh - 50px);
        height: calc(100dvh - 50px);
        max-height: calc(100vh - 50px);
        max-height: calc(100dvh - 50px);
        background: rgba(18, 19, 22, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        padding: 10px 0 140px 0;
        border-bottom: 1px solid rgba(16, 185, 129, 0.2);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        box-sizing: border-box;
        z-index: 1001;
    }

    nav.nav-scrolled .nav-links {
        top: 42px;
        height: calc(100vh - 42px);
        height: calc(100dvh - 42px);
        max-height: calc(100vh - 42px);
        max-height: calc(100dvh - 42px);
    }

    .nav-links.active {
        display: flex;
        animation: fadeInDown 0.3s ease forwards;
    }

    nav a {
        margin: 4px 0;
        width: 85%;
        font-size: 1.05rem;
        padding: 9px 12px;
        border-radius: 8px;
        max-width: none;
        flex-shrink: 0;
    }

    nav a:active {
        background: rgba(16, 185, 129, 0.15);
    }

    /* Dropdown in Mobile */
    .dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
    }

    .dropdown > a.dropbtn {
        width: 85%;
        justify-content: center;
        margin: 4px 0;
        padding: 9px 12px;
    }

    .dropdown-content {
        position: static;
        transform: none;
        width: 85%;
        background: rgba(16, 185, 129, 0.05);
        box-shadow: none;
        border: 1px solid rgba(16, 185, 129, 0.15);
        border-radius: 10px;
        padding: 6px 0;
        margin-bottom: 8px;
        display: none;
    }

    .dropdown-content a {
        margin: 3px auto;
        width: 90%;
        font-size: 0.95rem;
        padding: 8px 12px;
        border-radius: 6px;
    }

    /* Hamburger Animation */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Search Bar Styles */
.search-container {
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: #181a20; border: 1px solid #282b33;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Prompt List Styles */
.prompt-list {
    margin-top: 20px;
    text-align: left;
    width: 100%;
}

.prompt-card {
    background: rgba(26, 28, 33, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: default;
    overflow: hidden;
}

.prompt-card:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    /* Csak a fejléc kattintható az összecsukáshoz */
}

.prompt-title {
    color: #10b981;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
}

.prompt-title::before {
    content: '▶';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.prompt-card.open .prompt-title::before {
    transform: rotate(90deg);
}

.prompt-body {
    max-height: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0, 1, 0, 1);
    overflow: hidden;
}

.prompt-card.open .prompt-body {
    max-height: 2000px;
    opacity: 1;
    padding-top: 20px;
    transition: all 0.4s ease-in;
}

.copy-btn {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.copy-btn:hover {
    background: #10b981;
    color: #111;
}

.copy-btn.copied {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.prompt-text {
    background: rgba(0, 0, 0, 0.8);
    color: #eee;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.placeholder {
    color: #ffaa00;
    font-weight: bold;
    text-decoration: underline;
    background: rgba(255, 170, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* New Prompt Input Elements */
.prompt-input-wrapper {
    margin-bottom: 20px;
    text-align: left;
}

.prompt-input-label {
    display: block;
    color: #10b981;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prompt-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.prompt-field:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
    background: #181a20; border: 1px solid #282b33;
}

.final-prompt-label {
    display: block;
    color: #888;
    font-size: 0.75rem;
    margin: 15px 0 5px 0;
    font-weight: bold;
}

.prompt-text {
    background: rgba(18, 19, 22, 0.9);
    color: #ccc;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    border: 1px solid rgba(16, 185, 129, 0.15);
    transition: all 0.3s ease;
}

.prompt-text.has-content {
    color: #eee;
    border-color: rgba(16, 185, 129, 0.4);
}

.prompt-instruction-preview {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

/* ===================================================
   PWA TELEPÍTŐ SÁV ÉS MODAL (CYBERPUNK NEON THEME)
   =================================================== */
.pwa-banner {
    position: fixed;
    top: 54px;
    left: 0;
    width: 100%;
    z-index: 998;
    background: linear-gradient(180deg, rgba(8, 20, 18, 0.98) 0%, rgba(4, 12, 10, 0.96) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.85), 0 0 15px rgba(16, 185, 129, 0.15);
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

nav.nav-scrolled + .pwa-banner {
    top: 42px;
}

.pwa-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    cursor: pointer;
}

.pwa-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.pwa-icon-img {
    width: 24px;
    height: 24px;
    display: block;
}

.pwa-text-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-main-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.pwa-sub-title {
    font-size: 0.72rem;
    color: #9ab4ae;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.pwa-banner-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-action-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(0, 160, 130, 0.15) 100%);
    color: #10b981;
    border: 1px solid #10b981;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

.pwa-action-btn svg {
    stroke: #10b981;
    transition: transform 0.2s ease;
}

.pwa-action-btn:hover, .pwa-action-btn:active {
    background: #10b981;
    color: #05100e;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.8);
    transform: translateY(-1px);
}

.pwa-action-btn:hover svg, .pwa-action-btn:active svg {
    stroke: #05100e;
    transform: translateY(1px);
}

.pwa-close-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #7a948e;
    border: 1px solid rgba(16, 185, 129, 0.2);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.pwa-close-btn svg {
    stroke: #7a948e;
    transition: stroke 0.2s ease;
}

.pwa-close-btn:hover, .pwa-close-btn:active {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.pwa-close-btn:hover svg, .pwa-close-btn:active svg {
    stroke: #10b981;
}

.nav-pwa-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 16px;
    padding: 4px 10px !important;
    color: #10b981 !important;
}

.nav-pwa-item:hover {
    background: rgba(16, 185, 129, 0.3) !important;
    border-color: #10b981;
    color: #fff !important;
}

/* iOS PWA Modal */
.pwa-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.pwa-modal {
    background: #101614;
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 14px;
    max-width: 420px;
    width: 100%;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(16, 185, 129, 0.2);
}

.pwa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.pwa-modal-header h3 {
    margin: 0;
    color: #10b981;
    font-size: 1.05rem;
}

.pwa-modal-body p {
    font-size: 0.85rem;
    color: #bbb;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.pwa-modal-body ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
    font-size: 0.85rem;
    color: #ddd;
}

.pwa-modal-body li {
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .pwa-banner-container {
        padding: 6px 12px;
        gap: 8px;
    }
    .pwa-icon-box {
        width: 32px;
        height: 32px;
    }
    .pwa-icon-img {
        width: 20px;
        height: 20px;
    }
    .pwa-main-title {
        font-size: 0.8rem;
    }
    .pwa-sub-title {
        font-size: 0.68rem;
    }
    .pwa-action-btn {
        padding: 5px 11px;
        font-size: 0.76rem;
        gap: 4px;
    }
    .pwa-close-btn {
        width: 28px;
        height: 28px;
    }
}