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

:root {
    --ccg-bg-start: #141E30;
    /* Classic Deep Navy */
    --ccg-bg-mid: #243B55;
    --ccg-bg-end: #141E30;
    --ccg-accent-gold: #FDB931;
    /* Metallic Gold */
    --ccg-accent-purple: #9D50BB;
    --ccg-accent-blue: #6E48AA;
    --ccg-text: #ffffff;
    --ccg-font-head: 'Cinzel', serif;
    /* The "Horoscope" Font */
    --ccg-font-body: 'Lato', sans-serif;
    /* The "App" Font */
}

.cupocode-cosmic-wrapper {
    font-family: var(--ccg-font-body);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: radial-gradient(circle at center, var(--ccg-bg-mid), var(--ccg-bg-start));
    color: var(--ccg-text);
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Constellation Pattern */
.cupocode-cosmic-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .2) 1px, transparent 1.5px),
        radial-gradient(white, rgba(255, 255, 255, .1) 1px, transparent 1.5px);
    background-size: 300px 300px, 150px 150px;
    background-position: 0 0, 40px 60px;
    opacity: 0.6;
    pointer-events: none;
}

/* Header */
.cosmic-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.cosmic-slogan {
    font-family: var(--ccg-font-head);
    font-size: 1.6rem;
    color: var(--ccg-accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: -webkit-linear-gradient(#FDB931, #9f7928);
    background: linear-gradient(#FDB931, #9f7928);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(253, 185, 49, 0.3));
}

/* Grid */
.cosmic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    /* Smaller, app-icon sized */
    gap: 25px;
    padding: 10px;
    position: relative;
    z-index: 2;
    justify-items: center;
}

/* Pods - App Icon Style */
.cosmic-pod {
    width: 110px;
    height: 140px;
    /* Tall for label */
    border-radius: 15px;
    /* App icon shape-ish */
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    aspect-ratio: auto;
    /* Override previous circle aspect */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cosmic-pod:hover {
    transform: translateY(-5px);
    box-shadow: none;
    /* Remove box shadow from previous style */
}

/* Circle holding the icon */
.pod-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cosmic-pod:hover .pod-icon-wrapper {
    border-color: var(--ccg-accent-gold);
    background: rgba(157, 80, 187, 0.3);
    /* Purple tint */
    box-shadow: 0 0 20px rgba(157, 80, 187, 0.5);
    transform: none;
    /* Reset rotation */
}

.pod-icon {
    width: 60%;
    height: auto;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

.pod-fallback-icon {
    font-size: 40px;
    color: #fff;
}

.pod-title {
    font-family: var(--ccg-font-head);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    transition: color 0.3s;
}

.cosmic-pod:hover .pod-title {
    color: var(--ccg-accent-gold);
}

.pod-inner {
    text-align: center;
    z-index: 2;
    width: 100%;
}

.pod-steam {
    display: none;
}

/* Remove steam for cleaner app feel */


/* Modal Overlay */
.cosmic-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.cosmic-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content - The Reading Card */
.cosmic-modal-content {
    background: #1e1e24;
    /* Dark refined card */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    /* iOS rounded corners */
    width: 100%;
    max-width: 480px;
    /* Mobile width */
    height: auto;
    max-height: 90vh;
    /* Scrollable if needed */
    overflow-y: auto;
    padding: 0;
    /* Header image handles top padding */
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
}

.cosmic-modal-overlay.active .cosmic-modal-content {
    transform: translateY(0);
}

.cosmic-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

/* Modal Header Area */
.modal-header-section {
    background: linear-gradient(180deg, var(--ccg-accent-blue), var(--ccg-bg-mid));
    padding: 40px 20px 20px;
    text-align: center;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.modal-icon-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    /* Keeps space for flip */
}

/* Elements animating in */
#modal-title,
#modal-slogan,
.modal-body-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.2s;
}

.cosmic-modal-overlay.active #modal-title,
.cosmic-modal-overlay.active #modal-slogan,
.cosmic-modal-overlay.active .modal-body-section {
    opacity: 1;
    transform: translateY(0);
}

#modal-title {
    font-family: var(--ccg-font-head);
    font-size: 2.2rem;
    color: #fff;
    margin: 0 0 5px;
    font-weight: 400;
}

#modal-slogan {
    font-family: var(--ccg-font-body);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    font-style: normal;
}

/* Modal Body */
.modal-body-section {
    padding: 30px;
    background: #1e1e24;
}

.cosmic-vision-block,
.cosmic-strategy-block {
    margin-bottom: 30px;
    background: none;
    padding: 0;
    border: none;
}

.cosmic-vision-block h3,
.cosmic-strategy-block h3 {
    font-family: var(--ccg-font-head);
    color: var(--ccg-accent-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
}

.cosmic-vision-block h3::after,
.cosmic-strategy-block h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 10px;
}

.cosmic-vision-block p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff;
    font-weight: 400;
    font-style: normal;
}

.cosmic-strategy-block p {
    font-size: 1rem;
    line-height: 1.6;
    color: #a0a0a0;
}

/* FLIP Clone Styling */
.flip-clone {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}