:root {
    /* DTECH Theme Colors */
    --primary-blue: #00e5ff;
    --primary-blue-hover: #00b8cc;
    --btn-text: #0a0a0a;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --card-bg: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --border-color: #333;
}



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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.app-header {
    background-color: var(--darker-bg);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content h1 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    letter-spacing: 1px;
}

/* Main */
main {
    flex: 1;
    padding: 2rem 0;
}

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

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* App Card */
.app-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.15), 0 0 10px rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
}

.app-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 1rem;
    background-color: #333;
}

.app-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.app-card-version {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.app-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--btn-text);
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 229, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: var(--primary-blue-hover);
    box-shadow: 0 6px 15px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
}

.btn-secondary:hover {
    background-color: var(--card-bg);
}

.btn-large {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    width: auto;
    min-width: 200px;
}

/* App Details View */
.app-details-container {
    max-width: 100vw;
    overflow-x: hidden;
}

.app-header-info {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    margin-right: 1.5rem;
    background-color: #333;
}

.badge {
    display: inline-block;
    background-color: var(--border-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Screenshots Gallery */
.gallery {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    max-width: 100vw;
}

.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-track {
    background: var(--darker-bg);
    border-radius: 4px;
}

.gallery::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.screenshot {
    height: 300px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    max-width: 85vw;
}

/* Utilities */
.mb-4 { margin-bottom: 1.5rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Footer */
.app-footer {
    background-color: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Dynamic Sections */
.dynamic-section ul {
    list-style-type: none;
    padding-left: 0;
}

.dynamic-section ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.dynamic-section ul:not(.feature-list) li::before {
    content: "•";
    color: var(--primary-blue);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.dynamic-section ul.feature-list li {
    padding-left: 0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 600px) {
    .app-header-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .screenshot {
        height: 250px;
    }

    .btn-large {
        width: 100%;
    }
}

/* Full-Screen Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform: scale(0.9)}
    to {transform: scale(1)}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-blue);
    text-decoration: none;
    cursor: pointer;
}
