/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #f4f1e8;
    background: #0a0a0a;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== FANTASY BACKGROUND ===== */
.fantasy-theme {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 177, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

.magic-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* ===== TYPOGRAPHY ===== */
.guild-title,
.hero-title,
.section-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    display: block;
    font-size: 1.8rem;
    margin-top: 0.5rem;
    color: #c9b037;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #ffd700;
}

/* ===== HEADER ===== */
.guild-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffd700;
    padding: 1rem 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
}

.guild-title {
    font-size: 2rem;
    color: #ffd700;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    flex: none;
}

.guild-emblem {
    z-index: 10;
}

.guild-emblem .emblem-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.language-toggle {
    z-index: 10;
}

.guild-emblem .emblem-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

subtitle {
    display: block;
    font-size: 0.9rem;
    color: #c9b037;
    font-weight: 400;
}

.language-toggle {
    display: flex;
    gap: 10px;
}

.lang-btn {
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover,
.lang-btn.active {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.guild-emblem-large {
    margin-bottom: 2rem;
}

.guild-emblem-large .emblem-icon {
    width: 120px;
    height: 120px;
    margin: 0 20px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7));
    animation: float 3s ease-in-out infinite;
}

.guild-emblem-large .emblem-icon:nth-child(2) {
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #c9b037;
}

.hero-message {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== ORACLE BUTTONS ===== */
.latest-oracle {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.oracle-date {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffd700;
    font-weight: 600;
}

.oracle-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.oracle-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border: 2px solid #ffd700;
    border-radius: 15px;
    color: #f4f1e8;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 280px;
}

.oracle-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.oracle-btn.secondary {
    background: linear-gradient(135deg, rgba(201, 176, 55, 0.1), rgba(201, 176, 55, 0.05));
    border-color: #c9b037;
}

.oracle-btn.secondary:hover {
    background: linear-gradient(135deg, rgba(201, 176, 55, 0.2), rgba(201, 176, 55, 0.1));
    box-shadow: 0 0 25px rgba(201, 176, 55, 0.4);
    transform: translateY(-2px);
}

.oracle-btn.secondary .btn-main {
    color: #c9b037;
}

.btn-icon {
    font-size: 2rem;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-main {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffd700;
}

.btn-sub {
    font-size: 0.9rem;
    color: #c9b037;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.feature-desc {
    color: #c9b037;
    line-height: 1.6;
}

/* ===== RANKING SECTION ===== */
.ranking-section {
    margin: 3rem 0;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.ranking-item.highlight {
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.rank-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    font-family: 'Cinzel', serif;
}

.rank-suffix {
    font-size: 0.8rem;
    color: #c9b037;
}

.zodiac-info {
    flex: 1;
}

.zodiac-name {
    font-size: 1.3rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.character-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.character-name {
    font-weight: 600;
    color: #f4f1e8;
}

.character-job {
    color: #c9b037;
}

.character-level {
    color: #ffd700;
    font-weight: 600;
}

.stats-preview {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.stat-label {
    font-size: 0.8rem;
    color: #c9b037;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
}

.view-card-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-card-btn:hover {
    background: #ffd700;
    color: #000;
}

/* ===== CARDS SECTION ===== */
.cards-section {
    margin: 4rem 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card-container:hover {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.fortune-card {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.card-zodiac {
    color: #ffd700;
    margin-bottom: 1rem;
    text-align: center;
}

.card-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 3px solid #ffd700;
}

.compatibility {
    text-align: center;
}

.compatibility h5 {
    color: #c9b037;
    margin-bottom: 0.5rem;
}

.compatible-signs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.compatible-sign {
    padding: 0.3rem 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #ffd700;
}

/* ===== THUMBNAIL SECTION ===== */
.thumbnail-section {
    margin: 3rem 0;
    text-align: center;
}

.thumbnail-frame {
    margin-bottom: 2rem;
}

.thumbnail-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.share-buttons h3 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.share-btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
    box-shadow: 0 0 15px rgba(29, 161, 242, 0.5);
}

.share-btn.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.5);
}

.share-btn.line:hover {
    background: #06c755;
    color: white;
    border-color: #06c755;
    box-shadow: 0 0 15px rgba(6, 199, 85, 0.5);
}

.share-icon {
    font-size: 1.2rem;
}

/* ===== ADVERTISEMENT SLOTS ===== */
.ad-slot {
    margin: 2rem 0;
    text-align: center;
}

.ad-placeholder {
    /* Visual styles removed to avoid empty box */
    min-height: 0;
}

/* ===== DATE NAVIGATION ===== */
.date-header {
    text-align: center;
    margin-bottom: 2rem;
}

.date-title {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
    font-family: 'Cinzel', serif;
}

.date-navigation {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    /* Stretch to equal height */
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: nowrap;
    /* Prevent wrapping on mobile */
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    color: #ffd700;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    /* Equal width */
    min-width: 0;
    /* Allow shrinking */
}

.nav-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.nav-text {
    display: flex;
    flex-direction: column;
    /* Determine alignment handled by specific classes or default */
    line-height: 1.2;
}

.prev-btn .nav-text {
    align-items: flex-start;
    margin-left: 0.5rem;
    /* Space from icon */
}

.next-btn .nav-text {
    align-items: flex-end;
    margin-right: 0.5rem;
    /* Space from icon */
}

.next-btn {
    flex-direction: row;
    /* Keep icon on right */
}

.nav-label {
    font-size: 0.75rem;
    color: #c9b037;
    text-transform: uppercase;
}

.nav-date {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .date-navigation {
        gap: 0.5rem !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .nav-btn {
        padding: 0.5rem 0.2rem !important;
        font-size: 0.8rem;
        flex: 1 1 0 !important;
        width: 0 !important;
        /* Force flex basis */
        min-width: 0 !important;
        /* Allow shrinking */
    }

    .nav-date {
        font-size: 0.75rem !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-label {
        font-size: 0.6rem;
    }

    .date-title {
        font-size: 1.5rem;
    }

    .nav-text {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        /* Ensure text doesn't overflow container */
    }
}

/* ===== CALENDAR SECTION ===== */
.calendar-section {
    margin: 4rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    /* Limit width */
}

#fortune-calendar {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1.5rem;
    /* Remove fixed min-height to allow content to dictate size */
    width: 100%;
}

.calendar-header {
    margin-bottom: 1.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    /* Add gap between days */
}

/* Override previous aspect-ratio: 1 */
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    /* Rounded corners */
    font-size: 1rem;
    position: relative;
    /* Ensure border doesn't add to size */
    box-sizing: border-box;
}

/* ===== FOOTER ===== */
.guild-footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #ffd700;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    color: #ffd700;
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.footer-desc {
    color: #c9b037;
    line-height: 1.6;
}

.footer-section-title {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-link-list {
    list-style: none;
}

.footer-link-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #c9b037;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #ffd700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    padding-top: 1rem;
    text-align: center;
}

.copyright {
    color: #c9b037;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .title-sub {
        font-size: 1.3rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .guild-title {
        position: static;
        transform: none;
        font-size: 1.5rem;
        margin: 0.5rem 0;
    }

    .guild-header {
        padding: 0.5rem 0;
    }

    .oracle-buttons {
        flex-direction: column;
        align-items: center;
    }

    .oracle-btn {
        min-width: auto;
        width: 100%;
        max-width: 350px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .character-details {
        justify-content: center;
    }

    .stats-preview {
        justify-content: center;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .share-btn-group {
        flex-direction: column;
        align-items: center;
    }

    .share-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .guild-emblem-large .emblem-icon {
        width: 60px;
        height: 60px;
        margin: 0 5px;
    }

    /* Ultra-Compact Ranking Item Layout */
    .ranking-item,
    .ranking-item.rank-1,
    .ranking-item.rank-2,
    .ranking-item.rank-3 {
        display: grid;
        grid-template-columns: auto 1fr auto;
        /* Badge | Info | Button/Stats space */
        grid-template-areas:
            "badge info button"
            "badge stats stats";
        gap: 0.2rem 0.5rem;
        padding: 0.5rem;
        align-items: center;
        text-align: left;
        flex-direction: column;
        /* Reset any flex settings */
        min-height: 0;
        /* Allow shrinking */
    }

    /* Reset specific styles for top ranks that might be causing size differences */
    .ranking-item.rank-1 .rank-badge,
    .ranking-item.rank-2 .rank-badge,
    .ranking-item.rank-3 .rank-badge {
        transform: scale(0.7);
        /* Ensure scale is consistent */
        margin: 0;
        min-width: 40px;
    }

    .ranking-item.rank-1 .zodiac-name,
    .ranking-item.rank-2 .zodiac-name,
    .ranking-item.rank-3 .zodiac-name {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .view-card-btn {
        grid-area: button;
        width: auto;
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        margin-top: 0;
        white-space: nowrap;
        margin-left: auto;
        /* Push to right */
    }

    .rank-badge {
        grid-area: badge;
        transform: scale(0.7);
        margin: 0;
        min-width: 40px;
    }

    .zodiac-info {
        grid-area: info;
        min-width: 0;
        display: flex;
        align-items: center;
        /* or baseline */
        flex-wrap: nowrap;
        /* Prevent wrapping */
        gap: 0.4rem;
        overflow: hidden;
        /* Contain content */
    }

    .zodiac-name {
        font-size: 0.95rem;
        margin: 0;
        flex-shrink: 0;
        /* Ensure Zodiac name stays visible */
        line-height: 1.2;
    }

    .character-details {
        display: flex;
        align-items: center;
        font-size: 0.7rem;
        gap: 0.3rem;
        min-width: 0;
        /* Allow shrinking */
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
    }

    /* Ensure only job shrinks/truncates if really needed */
    .character-name {
        flex-shrink: 0;
        font-weight: 700;
    }

    .character-job {
        flex-shrink: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0.9;
    }

    .character-level {
        flex-shrink: 0;
        font-weight: 600;
        color: #ffd700;
    }

    .stats-preview {
        grid-area: stats;
        display: flex;
        /* Override grid default if needed */
        width: 100%;
        justify-content: flex-start;
        gap: 0.8rem;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .stat-item {
        min-width: auto;
        flex-direction: row;
        align-items: center;
        gap: 0.2rem;
    }

    .stat-label {
        font-size: 0.65rem;
        color: #c9b037;
    }

    .stat-value {
        font-size: 0.8rem;
    }

    .view-card-btn {
        grid-area: button;
        width: auto;
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        margin-top: 0;
        white-space: nowrap;
    }

    .card-container {
        padding: 1rem;
    }

    /* Date Navigation Mobile Overrides (Keep these) */
    .date-navigation {
        gap: 0.5rem !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .nav-btn {
        padding: 0.5rem 0.2rem !important;
        font-size: 0.8rem;
        flex: 1 1 0 !important;
        width: 0 !important;
        min-width: 0 !important;
    }

    .nav-date {
        font-size: 0.75rem !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-label {
        font-size: 0.6rem;
    }

    .date-title {
        font-size: 1.5rem;
    }

    .nav-text {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }
}

/* ===== LANGUAGE TOGGLE ===== */
.language-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.lang-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 20px;
    color: #ffd700;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}


/* ===== CARD MODAL & ZOOM ===== */
.card-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.card-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
}

.card-modal img {
    width: 100%;
    height: auto;
    display: block;
}

.card-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #ffd700;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.card-close:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

/* ===== CLICKABLE CARDS ===== */
.card-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.ranking-item .card-preview {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.ranking-item .card-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 1.5rem;
        padding: 0.5rem 0;
    }

    .guild-emblem {
        margin: 0;
        flex-shrink: 0;
    }

    .guild-emblem img {
        width: 50px;
        height: 50px;
    }

    .guild-title {
        font-size: 1.5rem;
        margin: 0;
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    .language-toggle {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        margin-left: auto;
    }

    .lang-btn {
        padding: 4px 12px;
        font-size: 0.8rem;
        min-width: 80px;
        text-align: center;
    }

    .oracle-buttons {
        gap: 1.5rem;
    }

    .oracle-btn {
        min-width: 200px;
        padding: 1rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Compact Ranking Item for Tablet */
    .ranking-item {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "badge info button"
            "badge stats stats";
        gap: 0.5rem 1rem;
        padding: 1rem;
        align-items: center;
        text-align: left;
    }

    .rank-badge {
        grid-area: badge;
        transform: scale(0.85);
        min-width: 50px;
    }

    .zodiac-info {
        grid-area: info;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .zodiac-name {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .stats-preview {
        grid-area: stats;
        margin-top: 0;
        justify-content: flex-start;
        gap: 1.5rem;
    }

    .view-card-btn {
        grid-area: button;
        margin-left: auto;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }

    .title-sub {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .guild-title {
        font-size: 1.3rem;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-message {
        font-size: 0.9rem;
    }

    .oracle-btn {
        padding: 1rem;
    }

    .btn-main {
        font-size: 1.1rem;
    }

    .btn-sub {
        font-size: 0.8rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature-title {
        font-size: 1.2rem;
    }

    .language-toggle {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        width: auto;
        margin-left: auto;
    }

    .lang-btn {
        flex: none;
        width: 80px;
        padding: 4px 8px;
        font-size: 0.75rem;
        text-align: center;
    }

    .thumbnail-image {
        max-width: 100%;
        height: auto;
    }

    .share-btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .share-btn {
        width: 100%;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .title-sub {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .guild-title {
        font-size: 1.1rem;
    }

    .guild-header {
        padding: 0.5rem 0;
    }

    .emblem-icon {
        width: 40px;
        height: 40px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .guild-emblem-large .emblem-icon {
        width: 80px;
        height: 80px;
    }

    .oracle-btn {
        padding: 0.8rem;
    }

    .btn-icon {
        font-size: 1.2rem;
    }

    .btn-main {
        font-size: 1rem;
    }

    .btn-sub {
        font-size: 0.7rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 1.8rem;
    }

    .feature-title {
        font-size: 1rem;
    }

    .feature-desc {
        font-size: 0.8rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .ranking-item {
        padding: 0.8rem;
    }

    .rank-badge {
        width: 50px;
        height: 50px;
    }

    .rank-number {
        font-size: 1.2rem;
    }

    .zodiac-name {
        font-size: 1.1rem;
    }

    .character-name {
        font-size: 0.9rem;
    }

    .stat-item {
        padding: 0.3rem 0.6rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .card-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .card-close {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 25px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .guild-header,
    .language-toggle,
    .share-buttons,
    .ad-slot,
    .guild-footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .fantasy-theme {
        background: white;
    }

    .bg-overlay,
    .magic-particles {
        display: none;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .magic-particles {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lang-btn {
        border-width: 2px;
    }

    .oracle-btn {
        border-width: 2px;
    }

    .feature-card {
        border: 2px solid #ffd700;
    }
}

/* Focus styles for keyboard navigation */
.lang-btn:focus,
.oracle-btn:focus,
.card-clickable:focus,
.emblem-icon:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* ===== PAGE CONTENT STYLES ===== */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===== TERMS OF SERVICE STYLES ===== */
.terms-content {
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.terms-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.terms-section:last-child {
    border-bottom: none;
}

.terms-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: #d4af37;
    margin-bottom: 15px;
    font-weight: 600;
}

.terms-section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #f4f1e8;
}

.terms-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.terms-section li {
    margin-bottom: 8px;
    color: #f4f1e8;
    line-height: 1.7;
}

.terms-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #d4af37;
    color: #d4af37;
    font-weight: 600;
}

/* ===== CONTACT PAGE STYLES ===== */
.contact-content {
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.contact-intro {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.contact-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #f4f1e8;
    margin-bottom: 15px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-method {
    text-align: center;
    padding: 30px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.method-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin-bottom: 20px;
    font-weight: 600;
}

.email-address {
    margin-bottom: 15px;
}

.email-address a {
    font-size: 1.3rem;
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #d4af37;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    transition: all 0.3s ease;
}

.email-address a:hover {
    background: #d4af37;
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.method-description {
    color: #f4f1e8;
    line-height: 1.7;
}

.contact-guidelines,
.faq-section,
.contact-note {
    padding: 30px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.contact-guidelines h3,
.faq-section h3,
.contact-note h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #d4af37;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-guidelines ul {
    margin-left: 20px;
}

.contact-guidelines li {
    margin-bottom: 10px;
    color: #f4f1e8;
    line-height: 1.7;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-question {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #d4af37;
    margin-bottom: 10px;
    font-weight: 600;
}

.faq-answer {
    color: #f4f1e8;
    line-height: 1.7;
    margin-left: 20px;
}

.contact-note {
    background: rgba(255, 177, 153, 0.1);
    border-color: rgba(255, 177, 153, 0.3);
}

.contact-note h3 {
    color: #ffb199;
}

.contact-note p {
    color: #f4f1e8;
    line-height: 1.8;
    font-style: italic;
}

/* ===== RESPONSIVE DESIGN FOR PAGES ===== */
@media (max-width: 768px) {
    .page-content {
        padding: 20px 10px;
    }

    .page-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .terms-content,
    .contact-content {
        padding: 20px;
    }

    .terms-section h2 {
        font-size: 1.2rem;
    }

    .method-title {
        font-size: 1.3rem;
    }

    .email-address a {
        font-size: 1.1rem;
        padding: 8px 16px;
    }

    .contact-guidelines h3,
    .faq-section h3,
    .contact-note h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }

    .terms-content,
    .contact-content {
        padding: 15px;
    }

    .contact-method,
    .contact-guidelines,
    .faq-section,
    .contact-note {
        padding: 20px;
    }
}

/* ===== CALENDAR SECTION STYLES ===== */
.calendar-section {
    margin: 60px 0;
    padding: 40px 0;
    background: rgba(20, 20, 40, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.calendar-intro {
    text-align: center;
    margin-bottom: 40px;
}

.calendar-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #f4f1e8;
    max-width: 600px;
    margin: 0 auto;
}

.calendar-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

#fortune-calendar {
    width: 100%;
    min-height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
}

/* ===== RESPONSIVE CALENDAR ===== */
@media (max-width: 768px) {
    .calendar-section {
        margin: 40px 0;
        padding: 30px 0;
    }

    .calendar-container {
        padding: 15px;
    }

    .calendar-description {
        font-size: 1rem;
        padding: 0 20px;
    }

    #fortune-calendar {
        min-height: 300px;
        font-size: 1rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .calendar-section {
        margin: 30px 0;
        padding: 20px 0;
    }

    #fortune-calendar {
        min-height: 250px;
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* ===== BUTTON DATE STYLES ===== */
.btn-date {
    display: block;
    font-size: 0.9rem;
    color: #c9b037;
    margin-top: 0.3rem;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 215, 0, 0.7));
    border: 2px solid #ffd700;
    border-radius: 50%;
    color: #0a0a0a;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* Responsive scroll to top button */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

.oracle-btn .btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.oracle-btn .btn-main {
    font-weight: 600;
}

/* Font Awesome icon adjustments */
.btn-icon i {
    font-size: 1.5rem;
}

/* Responsive adjustments for date display */
@media (max-width: 768px) {
    .btn-date {
        font-size: 0.7rem;
        margin-top: 2px;
    }
}


@media (max-width: 480px) {
    .btn-date {
        font-size: 0.65rem;
    }

    /* Feature Icons with Font Awesome */
    .feature-icon i {
        font-size: 2.5rem;
        color: #ffd700;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
}