:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary-color: #2f7e34;
    --primary-hover: #3ca243;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-blue: #3b82f6;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(47, 126, 52, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 45%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
header {
    margin-bottom: 40px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.brand-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    margin-bottom: 10px;
    background: linear-gradient(to right, #ffffff, #81c784);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Search bar & Controls */
.controls-row {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    animation: slideUp 0.6s ease-out;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex-grow: 1;
    min-width: 280px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: rgba(47, 126, 52, 0.5);
    box-shadow: 0 0 12px rgba(47, 126, 52, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.btn-search {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 25px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-search:hover {
    background: var(--primary-hover);
}

/* Category Sections */
.topic-section {
    margin-bottom: 50px;
    animation: fadeIn 1s ease-out;
}

.topic-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.topic-title span {
    color: #81c784;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* App Card */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(130deg, transparent, rgba(47, 126, 52, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.app-card:hover::before {
    transform: translateX(100%);
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: rgba(47, 126, 52, 0.35);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(47, 126, 52, 0.08);
}

.app-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-title-box {
    flex-grow: 1;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.app-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #81c784;
    background: rgba(47, 126, 52, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.app-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
    margin-top: auto;
}

.app-more-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #81c784;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s ease;
}

.app-card:hover .app-more-link {
    color: var(--primary-hover);
    gap: 8px;
}

.app-download-icon {
    color: var(--text-muted);
    transition: color 0.2s;
}

.app-card:hover .app-download-icon {
    color: #fff;
}

/* Detail Page Layout */
.app-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    animation: fadeIn 0.8s ease-out;
}

.detail-main {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.detail-header {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-title-box h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.detail-body {
    line-height: 1.7;
    color: #e2e8f0;
}

.detail-section {
    margin-bottom: 35px;
}

.detail-section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.detail-section ul {
    list-style-position: inside;
    margin-left: 5px;
}

.detail-section li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Sidebar Box (Download) */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-color);
    color: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(47, 126, 52, 0.2);
}

.download-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(47, 126, 52, 0.3);
}

.download-btn svg {
    transition: transform 0.2s ease;
}

.download-btn:hover svg {
    transform: translateY(2px);
}

.warning-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px dashed rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #fca5a5;
    line-height: 1.5;
}

.warning-box h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Steps Block */
.steps-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.step-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 24px;
    height: 24px;
    background: rgba(47, 126, 52, 0.15);
    color: #81c784;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-content {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-content strong {
    color: #fff;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 40px 20px;
    color: #4b5563;
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #fff;
}

/* Empty State */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 16px;
    color: var(--text-muted);
}

.no-results svg {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.1);
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsiveness */
@media (max-width: 768px) {
    .app-detail {
        grid-template-columns: 1fr;
    }
    .brand-title {
        font-size: 2.2rem;
    }
}
