/* 원키분양 섹션 트렌디한 반응형 CSS */

/* 기본 스타일 */
.onekey-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.onekey-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* 글래스모피즘 효과 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.onekey-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
}

.onekey-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.onekey-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.6;
    text-align: center;
}

/* API 카드 컨테이너 */
.api-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* API 카드 스타일 */
.api-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    color: white;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        0 8px 16px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.api-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.api-card:hover {
    transform: translateY(-20px) scale(1.03);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.15),
        0 12px 24px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.4);
}

.api-card:hover::before {
    opacity: 1;
}

/* 카드별 트렌디한 그라데이션 색상 */
.api-card.honorlink {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.api-card.paragon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 20px 40px rgba(240, 147, 251, 0.3);
}

.api-card.thenuts {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.3);
}

.api-card.evolution {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 20px 40px rgba(250, 112, 154, 0.3);
}

.api-card.revolution {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    box-shadow: 0 20px 40px rgba(168, 237, 234, 0.3);
    color: #2d3748 !important;
}

.api-card.revolution h4,
.api-card.revolution p {
    color: #2d3748 !important;
}

/* 네온 효과 */
.api-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: 26px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

.api-card:hover::after {
    opacity: 1;
}

/* 아이콘 스타일 */
.api-card-icon {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 25px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* 제목 스타일 */
.api-card h4 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 800;
    margin-bottom: 18px;
    color: white;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* 설명 텍스트 */
.api-card p {
    font-size: clamp(0.85rem, 2vw, 1rem);
    line-height: 1.7;
    margin: 0;
    color: rgba(255,255,255,0.95);
    font-weight: 400;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* 카드 로딩 애니메이션 */
.api-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.api-card:nth-child(1) { animation-delay: 0.1s; }
.api-card:nth-child(2) { animation-delay: 0.2s; }
.api-card:nth-child(3) { animation-delay: 0.3s; }
.api-card:nth-child(4) { animation-delay: 0.4s; }
.api-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 브레이크포인트 */

/* 큰 데스크톱 (1400px 이상) */
@media (min-width: 1400px) {
    .api-cards-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 25px;
    }
    
    .api-card {
        padding: 35px 25px;
    }
}

/* 데스크톱 (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .api-cards-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .onekey-title {
        font-size: 2.2rem;
    }
}

/* 중간 데스크톱 (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .api-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .onekey-title {
        font-size: 2rem;
    }
    
    .onekey-subtitle {
        font-size: 1.1rem;
    }
}

/* 태블릿 (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .api-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 15px;
    }
    
    .onekey-title {
        font-size: 1.8rem;
    }
    
    .onekey-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .api-card {
        padding: 30px 20px;
    }
    
    .api-card h4 {
        font-size: 1.3rem;
    }
    
    .api-card p {
        font-size: 0.9rem;
    }
}

/* 모바일 (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .api-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .onekey-title {
        font-size: 1.6rem;
    }
    
    .onekey-subtitle {
        font-size: 0.95rem;
        margin-bottom: 35px;
    }
    
    .api-card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .api-card-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .api-card h4 {
        font-size: 1.2rem;
    }
    
    .api-card p {
        font-size: 0.85rem;
    }
}

/* 작은 모바일 (575px 이하) */
@media (max-width: 575px) {
    .onekey-section {
        padding: 40px 0;
    }
    
    .api-cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .onekey-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .onekey-subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
        padding: 0 10px;
    }
    
    .api-card {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 15px;
    }
    
    .api-card-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .api-card h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .api-card p {
        font-size: 0.8rem;
        line-height: 1.5;
    }
}

/* 호버 효과 비활성화 (터치 디바이스) */
@media (hover: none) {
    .api-card:hover {
        transform: none;
        box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .onekey-subtitle {
        color: #ccc;
    }
    
    .api-card.revolution {
        color: #fff !important;
    }
    
    .api-card.revolution h4,
    .api-card.revolution p {
        color: #fff !important;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    .api-card {
        transition: none;
        animation: none;
    }
    
    .api-card:hover {
        transform: none;
    }
    
    .api-card-icon {
        animation: none;
    }
}

/* 포커스 상태 스타일 (키보드 내비게이션) */
.api-card:focus {
    outline: 3px solid rgba(255,255,255,0.6);
    outline-offset: 2px;
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .api-card {
        padding: 35px 25px;
    }
    
    .api-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* 데모 버튼 스타일 */
.demo-button {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255,255,255,0.2);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    margin: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    z-index: 100;
    cursor: pointer;
    pointer-events: auto;
}

/* 데모 버튼 내부 요소 */
.demo-button span {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

/* 데모 버튼 컨테이너 */
.api-card > div {
    position: relative;
    z-index: 50;
}

.demo-button:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.5);
    text-decoration: none;
    color: white;
}

.demo-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 통합 관리자 버튼 */
.api-card.revolution .demo-button {
    background: rgba(45, 55, 72, 0.15);
    color: #2d3748;
    border: 1px solid rgba(45, 55, 72, 0.3);
    font-weight: 600;
}

.api-card.revolution .demo-button:hover {
    background: rgba(45, 55, 72, 0.25);
    color: #1a202c;
    border-color: rgba(45, 55, 72, 0.5);
}

/* API 데모 시스템 헤더 스타일 */
.bt_bb_headline_tag h2,
.bt_bb_headline_tag h3 {
    line-height: 1.2;
    display: block;
}

.bt_bb_headline.bt_bb_size_extralarge h2 {
    font-size: 3rem !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

/* 반응형: 태블릿 */
@media (max-width: 991px) {
    .bt_bb_headline.bt_bb_size_extralarge h2 {
        font-size: 2.5rem !important;
    }
}

/* 반응형: 모바일 */
@media (max-width: 767px) {
    .bt_bb_headline.bt_bb_size_extralarge h2 {
        font-size: 2rem !important;
    }
    
    .bt_bb_column_content_inner[style*="flex-direction: column"] {
        gap: 8px !important;
    }
}

/* 페이지 섹션 간격 통일 */
.bt_bb_section {
    position: relative;
}

.bt_bb_section.bt_bb_color_scheme_1 {
    background-color: #ffffff;
}

/* 본문 배경 색상 */
body {
    background-color: #ffffff;
}

.bt-content-wrap,
.bt-content-holder,
.bt-content {
    background-color: transparent;
}

/* 데모 섹션 배경 */
#demo-section {
    position: relative;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #1a202c 100%);
}

/* product-intro 섹션 */
#product-intro {
    background-color: #ffffff;
    position: relative;
}

#demo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(240, 147, 251, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* 반응형 데모 버튼 */
@media (max-width: 768px) {
    .demo-button {
        display: block;
        width: 100%;
        max-width: 250px;
        margin: 8px auto;
        text-align: center;
    }
    
    .api-card {
        text-align: center;
    }
}

/* 데모 안내 박스 내 링크 스타일 */
#demo-section a[href^="https://theme"],
#demo-section a[href^="https://test-505"] {
    color: #4facfe;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

#demo-section a[href^="https://theme"]:hover,
#demo-section a[href^="https://test-505"]:hover {
    color: #67d4ff;
    transform: translateX(3px);
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

/* 테스트 계정 정보 박스 */
#demo-section code {
    background: rgba(0,0,0,0.3);
    padding: 4px 12px;
    border-radius: 6px;
    color: #4facfe;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 복사 가능한 코드 요소 호버 효과 */
#demo-section code.copy-text {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#demo-section code.copy-text:hover {
    background: rgba(79, 172, 254, 0.3);
    color: #67d4ff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

#demo-section code.copy-text:active {
    transform: scale(0.98);
}

/* 반응형: 모바일에서 테스트 정보 박스 */
@media (max-width: 768px) {
    #demo-section code {
        display: inline-block;
        margin-top: 5px;
        font-size: 0.9em;
    }
    
    #demo-section .custom-font {
        font-size: 0.95rem;
    }
}

/* 데모 링크 버튼 스타일 */
.demo-link-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    z-index: 10;
    cursor: pointer;
}

.demo-link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.demo-link-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5) !important;
    text-decoration: none;
    color: white !important;
    border-color: rgba(255,255,255,0.4);
}

.demo-link-button:hover::before {
    left: 100%;
}

.demo-link-button:active {
    transform: translateY(-2px) scale(1.02);
}

/* 버튼 내부 요소들이 클릭을 방해하지 않도록 */
.demo-link-button span {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

/* 반응형: 모바일 데모 링크 버튼 */
@media (max-width: 768px) {
    .demo-link-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 14px 24px;
        font-size: 1rem;
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .api-card-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 추가 트렌디한 효과 */
.onekey-container {
    position: relative;
    z-index: 1;
}

/* 파티클 효과를 위한 배경 요소 */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    animation: particlesFloat 20s linear infinite;
}

@keyframes particlesFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

/* 글로우 효과 */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #ff0080, #ff8c00, #40e0d0, #ff0080);
    border-radius: 30px;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity 0.3s ease;
}

.api-card:hover .glow-effect::before {
    opacity: 0.7;
}

/* 스크롤 트리거 애니메이션 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 모바일 터치 피드백 */
@media (max-width: 768px) {
    .api-card:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}
