:root {
    --bg-main: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1c1e21;
    --text-sub: #65676b;
    --accent: #007aff;
    --card-radius: 24px;
    --shadow-soft: 0 8px 30px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 5rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    padding: 6rem 0 4rem;
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #1c1e21 0%, #4b4d50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.25rem;
    color: var(--text-sub);
    font-weight: 500;
}

.portal-section {
    margin-bottom: 5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

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

.card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
    /* Entry animation base state */
    opacity: 0;
    transform: translateY(20px);
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    background: #ffffff;
}

.card:active {
    transform: translateY(-5px) scale(0.98);
    transition: all 0.1s ease;
}

.status-indicator {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sub);
    padding: 4px 10px;
    background: rgba(0,0,0,0.03);
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
}

.online .status-dot {
    background: #34c759;
    box-shadow: 0 0 10px #34c759;
}

.offline .status-dot {
    background: #ff3b30;
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: #f0f2f5;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease;
}

.card:hover .icon-wrapper {
    transform: rotate(-5deg) scale(1.1);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.card p {
    color: var(--text-sub);
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-footer {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer {
    margin-top: 10rem;
    padding: 4rem 0;
    text-align: center;
}

.footer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.footer-wrap:hover {
    opacity: 0.8;
}

.footer-wrap p {
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
}

.github-link {
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.github-link:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    header h1 { font-size: 2.5rem; }
    .grid { grid-template-columns: 1fr; }
}
