:root {
    --bg-color: #050510;
    --card-bg: #0f0f1a;
    --primary-color: #00f3ff;
    /* Cyan */
    --secondary-color: #ff00ff;
    /* Magenta */
    --text-color: #ffffff;
    --text-muted: #8888aa;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow: 0 0 10px var(--primary-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    padding: 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

/* Main Container */
main {
    flex: 1;
    padding: 20px;
    padding-bottom: 80px;
    /* Space for bottom nav */
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Tab Views */
.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

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

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

/* Injection Card */
.neon-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.neon-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 15px;
    color: var(--text-color);
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #00a8ff);
    color: #000;
    flex: 2;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    flex: 1;
}

.guide-text {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}

/* App List */
.search-bar {
    width: 100%;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-color);
    margin-bottom: 20px;
    outline: none;
    padding-left: 45px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238888aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 20px;
}

.search-bar:focus {
    border-color: var(--secondary-color);
}

.app-grid {
    display: grid;
    gap: 15px;
}

.app-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.app-item:active {
    transform: scale(0.98);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #222;
    object-fit: cover;
}

.app-info {
    flex: 1;
}

.app-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-ver {
    font-size: 0.8rem;
    color: var(--secondary-color);
    background: rgba(255, 0, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    padding: 15px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    gap: 5px;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center horizontally and vertically */
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1a1a24;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    width: 100%;
    max-width: 350px;
    position: relative;
    max-height: 90vh;
    /* Prevent overflowing screen height */
    overflow-y: auto;
    /* Allow scrolling if content is too tall */
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.price-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.price-card:hover {
    border-color: var(--secondary-color);
    background: rgba(255, 0, 255, 0.1);
}

.price-amount {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.price-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}