/* maigodiary.info Portal Page Styles */
:root {
    --bg-color: #000;
    --primary-color: #d4af37;
    --accent-color: #00f2ff;
    --accent-gold: #f2c94c;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(212, 175, 55, 0.2);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.portal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.portal-container {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin-top: 3rem;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-area {
    margin-bottom: 2rem;
}

.logo-main {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #ffffff 20%, #ffc1e3 60%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 193, 227, 0.5));
    letter-spacing: -1px;
    animation: logo-gentle-float 4s infinite ease-in-out;
}

.logo-sub {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: none;
    margin-top: 0.5rem;
    font-weight: 700;
    opacity: 0.9;
}

.portal-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.content-box {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

/* Media Queries moved to the end for correct override order */


.enter-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), #b8860b);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.enter-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

.btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 0.8rem;
}

.grid-btn i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.grid-btn span {
    font-weight: 700;
    font-size: 1rem;
}

.grid-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.grid-btn:hover i {
    transform: scale(1.1);
}

.grid-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #b8860b);
    color: #000;
    border: none;
}

.grid-btn.primary i {
    color: #000;
}

.grid-btn.primary:hover {
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.footer-nav {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

/* Redundant media queries removed. consolidated at the end of file. */

body.has-reward .content-box {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(0, 0, 0, 0.4);
}

.update-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.update-item.last {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.update-date {
    color: #60a5fa;
    font-weight: 700;
    min-width: 100px;
    flex-shrink: 0;
}


@keyframes logo-gentle-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}
/* ── 最新記事カード ── */
.latest-article-wrap {
    margin: 1.5rem 0 3rem;
    position: relative;
    z-index: 10;
}

.latest-article-card {
    display: block;
    text-decoration: none;
    position: relative;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.6));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.latest-article-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none; /* クリックを阻害しない */
}

.latest-article-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.2);
}

.latest-article-card:hover::before {
    opacity: 1;
}

/* 「NEW」バッジ */
.latest-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary-color);
    color: #000;
    font-size: 0.85rem;
    font-weight: 900;
    padding: 6px 20px;
    border-bottom-right-radius: 16px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.badge-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.article-no-label {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    display: block;
}

.article-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    font-family: 'Outfit', sans-serif;
}

.article-title-row {
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.2rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}


/* ── 豪華な記事検索ヒーローボタン ── */
.lux-search-hero {
    grid-column: 1 / -1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 2.2rem 2rem;
    background: linear-gradient(135deg, #d4af37 0%, #f2c94c 50%, #b8860b 100%);
    border-radius: 32px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.lux-search-hero:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 60px rgba(212, 175, 55, 0.5);
    filter: brightness(1.1);
}

/* 光の反射スウィープ */
.lux-search-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(25deg);
    animation: lux-shine-sweep 6s infinite;
    pointer-events: none; /* クリックを阻害しないように追加 */
}

@keyframes lux-shine-sweep {
    0% { left: -100%; }
    15% { left: 160%; }
    100% { left: 160%; }
}

.lux-search-icon {
    font-size: 2.8rem;
    color: #000;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lux-search-hero:hover .lux-search-icon {
    transform: scale(1.15) rotate(-8deg);
    background: rgba(255, 255, 255, 0.5);
}

.lux-search-content {
    text-align: left;
    z-index: 1;
}

.lux-search-content .title {
    color: #000 !important;
    font-weight: 900;
    font-size: 1.6rem;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    margin-bottom: 0.1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.lux-search-content .subtitle {
    color: rgba(0, 0, 0, 0.6) !important;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

/* --- Organized Responsive Styles --- */

/* Large screens (Min-width overrides) */
@media (min-width: 1200px) {
    body.has-reward {
        align-items: flex-start;
        padding-left: 8%;
    }
    body.has-reward .portal-container {
        text-align: left;
        margin-left: 0;
        max-width: 700px;
    }
    body.has-reward .logo-area {
        text-align: left;
    }
    body.has-reward .description {
        text-align: left;
    }
    body.has-reward .btn-grid {
        justify-content: flex-start;
    }
}

/* Tablets and below */
@media (max-width: 768px) {
    .logo-main {
        font-size: 3.2rem; /* ちょっと小さめに */
    }
    .portal-container {
        padding: 1rem;
        width: 100%;
        max-width: 100vw;
        margin-top: 1.5rem;
        overflow-x: hidden;
    }
    .content-box {
        padding: 1.5rem;
        border-radius: 20px;
        width: 100%;
    }
    .portal-grid-container {
        grid-template-columns: 1fr !important; /* 768px以下は常に1列 */
        gap: 1.2rem;
    }
    .description {
        font-size: 1rem;
    }
}

/* Phones */
@media (max-width: 480px) {
    .logo-main {
        font-size: 2.8rem;
    }
    .grid-btn-sub {
        padding: 1.2rem !important;
        gap: 15px !important;
    }
    .lux-search-hero {
        padding: 1.5rem;
        gap: 15px;
        border-radius: 20px;
    }
    .lux-search-icon {
        width: 54px;
        height: 54px;
        font-size: 2rem;
        border-radius: 12px;
    }
    .lux-search-content .title {
        font-size: 1.3rem;
    }
    .update-item {
        flex-direction: column;
        gap: 0.3rem;
    }
    .update-date {
        min-width: auto;
        font-size: 0.9rem;
    }
    .article-number {
        font-size: 2.5rem;
    }
    .article-title-row {
        font-size: 1.1rem;
    }
    .lux-search-content .subtitle {
        font-size: 0.8rem;
    }
}

/* Small Phones (iPhone SE etc.) */
@media (max-width: 320px) {
    .logo-main {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }
    .logo-sub {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    .content-box {
        padding: 0.75rem; /* 最大限コンテンツ幅を確保 */
    }
    .latest-article-card {
        padding: 1.2rem 0.6rem !important;
    }
    .article-number {
        font-size: 2.2rem !important;
    }
    .lux-search-hero {
        padding: 1rem !important;
        gap: 10px !important;
    }
    .lux-search-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.6rem !important;
    }
    .lux-search-content .title {
        font-size: 1.15rem !important;
    }
}
