@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0a2540;
    --primary-light: #163e65;
    --accent: #f4c74d;
    --accent-hover: #ffd700;
    --bg-gradient: linear-gradient(135deg, #061527 0%, #0e2744 50%, #153860 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --success: #10b981;
}

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

body {
    font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    padding: 1.5rem 2rem;
    background: rgba(10, 37, 64, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.network-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Main Content */
main {
    flex: 1;
    max-width: 1700px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.hero-section {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #e2e8f0, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Grid Layout */
.app-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

/* App Card */
.app-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    max-width: 380px;
    width: 100%;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: background 0.3s;
}

.app-card.featured::before {
    background: linear-gradient(90deg, var(--accent), #eab308);
}

.app-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(244, 199, 77, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(244, 199, 77, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--accent);
    transition: all 0.3s;
}

.app-card:hover .icon-wrapper {
    background: rgba(244, 199, 77, 0.1);
    color: #ffffff;
    border-color: rgba(244, 199, 77, 0.3);
    transform: scale(1.05);
}

.badge {
    background: rgba(244, 199, 77, 0.1);
    color: var(--accent);
    border: 1px solid rgba(244, 199, 77, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
}

.badge.system {
    background: rgba(156, 163, 175, 0.1);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.card-body {
    margin-bottom: 2rem;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.app-desc {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.5;
    font-weight: 300;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.action-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-footer {
    display: flex;
    align-items: center;
}

.btn-enter {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    padding: 0.85rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-card.featured .btn-enter {
    background: var(--accent);
    color: var(--primary);
    border: none;
}

.app-card.featured .btn-enter:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(244, 199, 77, 0.3);
}

.btn-enter:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-enter svg {
    transition: transform 0.3s;
}

.btn-enter:hover svg {
    transform: translateX(4px);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 37, 64, 0.2);
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Back Button styling for subpages */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.btn-back svg {
    transition: transform 0.3s ease;
}

.btn-back:hover svg {
    transform: translateX(-2px);
}

/* Card Overlay Link */
.card-link-overlay {
    display: none;
}

/* Responsive Styles for Mobile Devices */
@media (max-width: 576px) {
    header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        text-align: center;
    }

    .logo-container {
        flex-direction: column;
        gap: 0.4rem;
    }

    .brand-text {
        align-items: center;
    }

    .brand-title {
        font-size: 1.15rem;
    }

    .brand-subtitle {
        font-size: 0.75rem;
    }

    main {
        padding: 1.5rem 0.85rem;
        gap: 1.5rem;
    }

    .hero-section {
        gap: 0.25rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-desc {
        font-size: 0.88rem;
    }

    .app-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    .app-card {
        padding: 0.6rem 0.25rem 0.75rem;
        border-radius: 0.75rem;
        aspect-ratio: 1 / 1.28;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .card-header {
        margin-bottom: 0.35rem;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        width: 100%;
        gap: 0.25rem;
    }

    .icon-wrapper {
        width: 44px;
        height: 44px;
        border-radius: 0.6rem;
        margin: 0;
    }

    .icon-wrapper svg {
        width: 22px;
        height: 22px;
    }

    .card-body {
        margin-bottom: 0;
    }

    .app-name {
        font-size: 0.75rem;
        font-weight: 500;
        margin-bottom: 0;
        line-height: 1.25;
        color: #ffffff;
        word-break: break-word;
    }

    /* Hide descriptions, quick links, and footer buttons on mobile */
    .app-desc,
    .quick-actions,
    .card-footer {
        display: none !important;
    }

    .app-card.featured .badge {
        display: none !important;
    }

    .app-card:not(.featured) .badge {
        display: inline-block !important;
        font-size: 0.55rem;
        padding: 0.05rem 0.2rem;
        border-radius: 4px;
        background: rgba(244, 199, 77, 0.1);
        color: var(--accent);
        border: 1px solid rgba(244, 199, 77, 0.25);
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-link-overlay {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
    }
    
    .btn-back {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 0.5rem;
    }

    footer {
        padding: 1.25rem 1rem;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   Service Evaluation Modal & Grid Styles
   ========================================================================== */

/* Card Footer Action Label */
.card-footer-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.app-card:hover .card-footer-action {
    color: #ffffff;
    gap: 0.8rem;
}

.card-footer-action svg {
    transition: transform 0.3s ease;
}

.app-card:hover .card-footer-action svg {
    transform: scale(1.15);
}

/* Evaluation Page Grid Customizations */
.evaluation-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.evaluation-grid .app-card {
    max-width: 380px;
    width: 100%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Overlay */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(6, 21, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

/* Modal Content Box */
.modal-content {
    background: rgba(14, 39, 68, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    width: 95%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(244, 199, 77, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: #ffffff;
}

.modal-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

/* QR Box Inside Modal */
.modal-qr-wrapper {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 1.25rem;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.modal-qr-wrapper:hover {
    transform: scale(1.02);
}

.modal-qr-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.modal-instruction {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.5;
}

/* Mobile responsive styles for Evaluation page */
@media (max-width: 576px) {
    .evaluation-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
        padding: 0 0.5rem !important;
    }

    .evaluation-grid .app-card {
        max-width: 340px !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        padding: 2.25rem 1.75rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: left !important;
    }

    .evaluation-grid .card-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1.25rem !important;
        gap: 0 !important;
    }

    .evaluation-grid .icon-wrapper {
        width: 52px !important;
        height: 52px !important;
        border-radius: 0.85rem !important;
        margin: 0 !important;
    }

    .evaluation-grid .icon-wrapper svg {
        width: 26px !important;
        height: 26px !important;
    }

    .evaluation-grid .app-name {
        font-size: 1.35rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.4 !important;
        text-align: left !important;
    }

    /* Restore description visibility */
    .evaluation-grid .app-desc {
        display: block !important;
        text-align: left !important;
        margin-bottom: 0.5rem !important;
    }

    .evaluation-grid .card-link-overlay {
        display: none !important;
    }
}

