/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles - Hero Section */
.header {
    padding: 3rem 0 2rem 0;
    text-align: center;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}


.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

/* Search Container */
.search-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin-top: 1rem;
}

.search-input {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.25rem;
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header {
        padding: 2rem 0 1.5rem 0;
    }
    
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-input {
        padding: 1rem 3rem 1rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Main content */
.main-content {
    flex: 1;
    padding: 1.5rem 0 2rem 0;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Application cards */
.app-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--app-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--app-color);
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--app-color), var(--app-color)dd);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.icon-emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.app-description {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

.app-category {
    display: inline-block;
    background: var(--app-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.app-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #ccc;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.app-card:hover .app-arrow {
    color: var(--app-color);
    transform: translateX(5px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    opacity: 0.9;
}

.footer p {
    margin: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 1.5rem;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .app-card {
        padding: 1.5rem;
        min-height: 180px;
    }
    
    .app-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .icon-emoji {
        font-size: 2rem;
    }
    
    .app-name {
        font-size: 1.3rem;
    }
}

/* Admin pages (better contrast + "messagebox" login) */
.admin-page .main-content {
    padding-top: 0.75rem;
}

.admin-shell {
    max-width: 720px;
    margin: 0 auto;
}

.admin-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
    font-weight: 500;
}

.admin-link-button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.admin-card {
    cursor: default;
}

.admin-form {
    margin-top: 1rem;
}

.admin-form-grid {
    display: grid;
    gap: 0.85rem;
}

.admin-label {
    display: grid;
    gap: 0.35rem;
    color: #111;
    font-weight: 600;
}

.admin-input {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: #fff;
    color: #111;
    font-size: 1rem;
    outline: none;
}

.admin-input:focus {
    border-color: rgba(102, 126, 234, 0.9);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.admin-button {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: none;
    background: #111;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.admin-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.admin-button:active {
    transform: translateY(1px);
}

.admin-alert {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-weight: 600;
}

.admin-alert-error {
    border-color: rgba(244, 67, 54, 0.35);
    background: rgba(244, 67, 54, 0.08);
    color: #7a0b0b;
}

.admin-alert-success {
    border-color: rgba(76, 175, 80, 0.35);
    background: rgba(76, 175, 80, 0.08);
    color: #0b4d0e;
}

.admin-modal {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.admin-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.admin-modal-title {
    margin: 0;
    font-size: 1.35rem;
    color: #111;
    letter-spacing: -0.01em;
}

.admin-modal-subtitle {
    margin: 0.15rem 0 0 0;
    color: #555;
    font-weight: 500;
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .app-card {
        padding: 1rem;
    }
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card {
    animation: fadeInUp 0.6s ease forwards;
}

.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }
.app-card:nth-child(5) { animation-delay: 0.5s; }
.app-card:nth-child(6) { animation-delay: 0.6s; }
