/* ============================================================
   Modern Dark Glassmorphism Theme for Portal Site
   ============================================================ */

/* CSS Variables */
:root {
    /* Colors */
    --bg-color: #0f172a;
    /* Tailwind Slate 900 */
    --text-main: #f8fafc;
    /* Tailwind Slate 50 */
    --text-muted: #94a3b8;
    /* Tailwind Slate 400 */

    --primary-color: #8b5cf6;
    /* Purple 500 */
    --primary-hover: #7c3aed;
    /* Purple 600 */
    --secondary-color: #3b82f6;
    /* Blue 500 */

    --accent-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));

    /* Glassmorphism settings */
    --glass-bg: rgba(30, 41, 59, 0.6);
    /* Slate 800 with opacity */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Animation */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ============================================================
   Background Animated Blobs
   ============================================================ */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    /* Pink 500 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-30px, 20px) scale(0.9);
    }
}

/* ============================================================
   Typography & Utilities
   ============================================================ */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.primary-btn {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
    filter: brightness(1.1);
}

/* ============================================================
   Structure
   ============================================================ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ============================================================
   Header
   ============================================================ */
.glass-header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 60px 20px;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   Blog Banner (Glass Card)
   ============================================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
}

.blog-banner {
    margin-bottom: 40px;
    padding: 30px;
    transition: var(--transition);
}

.blog-banner:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.banner-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.banner-info {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.gradient-icon {
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.banner-info h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.banner-info p {
    color: var(--text-muted);
}

/* Recent Articles List styles */
.recent-articles-container {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
}

.recent-articles-list {
    max-height: 250px; /* Approximately 5 items high */
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
}

/* Scrollbar styling for the list */
.recent-articles-list::-webkit-scrollbar {
    width: 6px;
}
.recent-articles-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
.recent-articles-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}
.recent-articles-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.8);
}

.recent-article-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    border-radius: 4px;
}

.recent-article-item:last-child {
    border-bottom: none;
}

.recent-article-item:hover {
    background: rgba(139, 92, 246, 0.15);
    padding-left: 20px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--primary-color);
    min-width: 100px;
}

.article-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Filter Section
   ============================================================ */
.filter-section {
    margin-bottom: 40px;
}

.filter-header {
    margin-bottom: 20px;
}

.filter-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* ============================================================
   App Grid
   ============================================================ */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.app-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.5);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.app-card:hover .card-image {
    transform: scale(1.05);
}

.image-container {
    overflow: hidden;
    position: relative;
    /* Placeholder background generated by JS if no image */
}

/* Optional Overlay on image hover */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 92, 246, 0.3);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-card:hover .image-overlay {
    opacity: 1;
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.app-card:hover .card-title {
    color: var(--primary-color);
}

.card-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.genre-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-main);
}

.visit-icon {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.app-card:hover .visit-icon {
    transform: translateX(5px) scale(1.1);
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============================================================
   Footer & Profile
   ============================================================ */
.glass-footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding-top: 60px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.profile-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.copyright-bar {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ============================================================
   Responsive Design
   ============================================================ */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-banner {
        padding: 20px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }
}