:root {
    --primary: #144942;
    --primary-hover: #124649;
    --bg-dark: #124136;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Animated Gradient */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.15) 0%, transparent 50%);
    z-index: -1;
}

header {
    padding: 2rem;
    text-align: center;
    background: rgba(10, 71, 53, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #9ba0aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

main {
    flex: 1;
    padding: 3rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    display: block;
}

.app-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.app-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.2);
}

.app-card:hover::before {
    opacity: 1;
}

.app-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    /* Fallback highlight */
    background: var(--bg-dark);
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.app-url {
    font-size: 0.9rem;
    color: var(--text-muted);
    word-break: break-all;
    margin-bottom: 1.5rem;
}

.app-download {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 80%;
    margin: 0.8rem auto 0;
}

.app-download:hover {
    background: #ffffff;
    color: var(--bg-dark);
    border-color: #ffffff;
    transform: scale(1.05);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: block;
    width: fit-content;
    color: var(--text-main);
    clear: both;
}

.installers-grid {
    margin-bottom: 4rem;
}

.download-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.app-download-btn {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.app-download-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(20, 73, 66, 0.4);
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

.admin-login-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(31, 41, 55, 0.5);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
}

.admin-login-btn:hover {
    background: var(--primary);
    color: white;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

/* File Input Styling */
input[type="file"] {
    padding: 0.5rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed var(--glass-border);
    cursor: pointer;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: white;
}

.btn-edit {
    color: #ffffff;
    text-decoration: none;
    margin-right: 15px;
    font-size: 0.85rem;
}