/* modern-master.css - Unified Premium Design for Ad Tools */

@font-face {
    font-family: 'GmarketSans';
    src: url('font/GmarketSansLight.otf') format('opentype');
    font-weight: 300;
}

@font-face {
    font-family: 'GmarketSans';
    src: url('font/GmarketSansMedium.otf') format('opentype');
    font-weight: 500;
}

@font-face {
    font-family: 'GmarketSans';
    src: url('font/GmarketSansBold.otf') format('opentype');
    font-weight: 700;
}

:root {
    /* 3-Color Strict Palette but synced with Master-Center tokens where applicable */
    --m-blue: #402fb5;
    --m-pink: #cf30aa;
    --m-white: #ffffff;
    --m-dim: rgba(255, 255, 255, 0.7);

    /* Sync with Master-Center Glass Tokens */
    --glass-bg: rgba(0, 0, 0, 0.65);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-liquid-out: 0 15px 35px rgba(0, 0, 0, 0.4);
    --radius-xl: 20px;
    --m-red: #ff4d4d;
}

body {
    font-family: 'GmarketSans', sans-serif;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--m-white);
    margin: 0;
    overflow-x: clip;
    line-height: 1.6;
    padding-bottom: 280px; /* Space for the 220px high fixed footer bar */
}

/* --- Background Animation Container --- */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: transparent !important;
}

#hero-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}


/* --- Premium Glass Cards (Advanced Glassmorphism) --- */
.neu-card, .card, .glass-card {
    /* Almost completely transparent black background */
    background: rgba(0, 0, 0, 0.02) !important;
    
    /* Standardized 10px blur */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    
    /* Subtle unified border */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    
    border-radius: var(--radius-xl) !important;
    padding: 40px !important;
    
    /* Standardized glass shadow */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    
    margin-bottom: 40px;
    position: relative;
    color: var(--m-white) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.neu-card:hover, .card:hover, .glass-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.5) !important;
}


/* --- Typography Helpers --- */
.main-title {
    font-size: var(--size-4xl);
    font-weight: 800;
    color: var(--m-white);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    /* 블랙 배경용 고대비 화이트 (글자 선명도 극대화) */
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 1) !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    transform: translateZ(0); 
    -webkit-font-smoothing: antialiased;
    z-index: 1000 !important;
    position: relative !important;
}

.text-dim { color: var(--m-dim) !important; }
.text-white { color: var(--m-white) !important; }
.text-blue { color: var(--m-blue) !important; text-shadow: 0 0 10px rgba(0, 123, 255, 0.5) !important; }
.text-pink { color: var(--m-pink) !important; text-shadow: 0 0 10px rgba(255, 101, 247, 0.5) !important; }

/* --- Inset Glass Input Style --- */
.glass-input, textarea, input[type="text"], input[type="number"], select {
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.5), 
                inset -2px -2px 10px rgba(255, 255, 255, 0.02) !important;
    color: var(--m-white) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    padding: 12px 15px !important;
}

.glass-input:focus, textarea:focus, input:focus {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--m-blue) !important;
    box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.6), 
                0 0 10px rgba(0, 123, 255, 0.3) !important;
    outline: none !important;
}


/* --- Premium Buttons (Poda Style) --- */
.poda-btn-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
    transition: all 0.3s;
    text-decoration: none !important;
}

.poda-btn-wrapper:hover { transform: translateY(-3px) scale(1.02); }

.poda-bg-layer {
    position: absolute;
    z-index: -1;
    inset: -4px;
    border-radius: 54px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.poda-btn-wrapper:hover .poda-bg-layer { opacity: 1; }

.poda-bg-layer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
}

.poda-btn-wrapper:hover .poda-bg-layer::before,
.neu-card:hover .poda-bg-layer::before,
.ps-footer-btn:hover .poda-bg-layer::before {
    animation: spin-slow 3s linear infinite;
}

@keyframes spin-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.poda-bg-layer.l1 { filter: blur(8px); }
.poda-bg-layer.l1::before { background: conic-gradient(#000, var(--m-blue) 5%, #000 38%, #000 50%, var(--m-pink) 60%, #000 87%); }

.poda-bg-layer.l4 { filter: blur(1px); }
.poda-bg-layer.l4::before { background: conic-gradient(rgba(0, 0, 0, 0), var(--m-blue) 5%, rgba(0, 0, 0, 0) 15%, rgba(0, 0, 0, 0) 50%, var(--m-pink) 60%, rgba(0, 0, 0, 0) 70%); }

.location-selector-app {
    /* 전역 블러 제거 (가독성 방해 요소) */
    backdrop-filter: none !important;
}

.poda-btn-content {
    position: relative;
    background: linear-gradient(135deg, #010201 0%, #1a1a1a 100%);
    color: white !important;
    border-radius: 50px;
    padding: 14px 35px;
    font-weight: 700;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* --- Global Navbar (Optional sync with index-kr) --- */
.m-header {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
/* --- Footer Action Buttons (Master OS Glass - Premium) --- */
.footer-actions-container-ps {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    /* Increased height for larger text */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    display: flex;
    flex-direction: column;
    /* Stack text and buttons */
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 2000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0px -10px 40px rgba(0, 0, 0, 0.6);
}

.ps-footer-cta-text {
    color: #fff;
    font-size: 2.2rem;
    /* Doubled from 1.1rem */
    font-weight: 800;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.ps-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.ps-footer-btn {
    position: relative;
    flex: 1;
    max-width: 400px;
    height: 50px;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.ps-footer-btn:hover {
    transform: translateY(-2px);
}

/* Reusing poda-style components for footer buttons */
.ps-footer-btn .footer-bg-layer {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.ps-footer-btn .bg-l1 {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* Spinning Border Effect for Footer - Synchronized with Hero */
.ps-footer-btn .poda-bg-layer {
    position: absolute;
    z-index: 0;
    inset: -2px;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    /* Glow layers always visible to match hero button */
    opacity: 1;
}

.ps-footer-btn .poda-bg-layer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    transition: all 2s;
}

.ps-footer-btn .poda-bg-layer.l1 {
    filter: blur(4px);
    opacity: 0.8;
}

.ps-footer-btn .poda-bg-layer.l1::before {
    background: conic-gradient(#000, var(--m-blue) 5%, #000 38%, #000 50%, var(--m-pink) 60%, #000 87%);
    transform: translate(-50%, -50%) rotate(60deg);
}

.ps-footer-btn .poda-bg-layer.l2 {
    filter: blur(3px);
    opacity: 0.7;
}

.ps-footer-btn .poda-bg-layer.l2::before {
    background: conic-gradient(rgba(0, 0, 0, 0), #18116a, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 50%, #6e1b60, rgba(0, 0, 0, 0) 60%);
    transform: translate(-50%, -50%) rotate(82deg);
}

.ps-footer-btn .poda-bg-layer.l3 {
    filter: blur(2px);
    opacity: 0.5;
}

.ps-footer-btn .poda-bg-layer.l3::before {
    background: conic-gradient(rgba(0, 0, 0, 0) 0%, #a099d8, rgba(0, 0, 0, 0) 8%, rgba(0, 0, 0, 0) 50%, #dfa2da, rgba(0, 0, 0, 0) 58%);
    transform: translate(-50%, -50%) rotate(83deg);
    filter: brightness(1.4);
}

.ps-footer-btn .poda-bg-layer.l4 {
    filter: blur(0.5px);
}

.ps-footer-btn .poda-bg-layer.l4::before {
    background: conic-gradient(#1c191c, var(--m-blue) 5%, #1c191c 14%, #1c191c 50%, var(--m-pink) 60%, #1c191c 64%);
    transform: translate(-50%, -50%) rotate(70deg);
    filter: brightness(1.3);
}

.ps-footer-btn:hover .l4::before {
    transform: translate(-50%, -50%) rotate(-110deg);
}


.ps-footer-btn .btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    /* Force white text for all footer buttons */
}

/* Shaking Animation for Icons */
@keyframes icon-shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.ps-footer-btn .btn-content i {
    display: inline-block;
    animation: icon-shake 0.5s ease-in-out infinite;
    transform-origin: center;
    font-size: 1.2rem;
}

.ps-footer-btn.kakao .btn-content i {
    color: #fff;
    /* Changed to white */
}

/* Solid back background to mask layers exactly like hero button */
.ps-footer-btn::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: #010201;
    border-radius: 11px;
    z-index: 1;
}

@media (max-width: 768px) {
    .footer-actions-container-ps {
        height: 220px;
        /* Reduced from 300px */
        padding: 4px 20px 15px;
        /* Top padding reduced to 4px (1/4 of 15px approx) */
    }

    .ps-footer-cta-text {
        font-size: 1.6rem;
        /* Balanced for mobile */
        margin-bottom: 15px;
    }

    .ps-button-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .ps-footer-btn {
        width: 100%;
        max-width: none;
        height: 50px;
        font-size: 0.95rem;
    }
}
/* --- Iframe Specific Integration --- */
@media screen {
    :root {
        /* This part is hard to do without JS, but we already have plexus-background.js check */
    }
}

/* Force transparency for all containers if we detect an iframe environment */
/* Since we can't easily detect iframe in pure CSS, we rely on the parent having injected a class or similar, 
   but here we just make these transparent by default as they are supposed to be glassmorphic anyway. */

.recommendation-app, .main-calculator-wrapper, .input-area-wrapper {
    background: transparent !important;
}

.neu-card, .card, .glass-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(15px) !important;
}
