/* ═══════════════════════════════════════════════════════════
   국가별 블록체인 미디어 통계 섹션 스타일
   ═══════════════════════════════════════════════════════════ */

/* 국가별 통계 섹션 */
.country-stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #FAF8F3 0%, #F5F3EE 100%);
}

.country-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* 국가 카드 */
.country-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.1);
    position: relative;
    overflow: hidden;
}

.country-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--main-brown), var(--gold-brown));
    transition: left 0.4s ease;
}

.country-card:hover::before {
    left: 0;
}

.country-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 35px rgba(139, 111, 71, 0.25);
    border: 2px solid var(--gold-brown);
}

/* 파이코인 카드 특별 스타일 */
.picoin-card {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFEDCC 100%);
    border: 2px solid #FFB800;
}

.picoin-card::before {
    background: linear-gradient(90deg, #FFB800, #FFA500);
}

.picoin-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(255, 184, 0, 0.4);
    border: 3px solid #FFB800;
    background: linear-gradient(135deg, #FFEDCC 0%, #FFE5B4 100%);
}

.picoin-card .country-flag {
    font-size: 5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

.picoin-card:hover .country-flag {
    animation: spin-pulse 0.8s ease-in-out;
}

@keyframes spin-pulse {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.3); }
    50% { transform: rotate(180deg) scale(1.1); }
    75% { transform: rotate(270deg) scale(1.3); }
    100% { transform: rotate(360deg) scale(1); }
}

.picoin-card .country-name {
    color: #CC7A00;
    font-weight: 900;
}

.picoin-card .country-count {
    color: #FFB800;
    font-size: 3rem;
    text-shadow: 3px 3px 6px rgba(255, 184, 0, 0.3);
}

.picoin-card .country-desc {
    color: #AA6600;
    font-weight: 600;
}

.country-flag {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.country-card:hover .country-flag {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.country-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 10px;
}

.country-count {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--main-brown);
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.country-desc {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-bottom: 15px;
}

.card-hover-effect {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    color: var(--main-brown);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.country-card:hover .card-hover-effect {
    opacity: 1;
    transform: translateY(0);
}

.card-hover-effect i {
    transition: transform 0.3s ease;
}

.country-card:hover .card-hover-effect i {
    transform: translateX(5px);
}

/* ═══════════════════════════════════════════════════════════
   국가별 홈페이지 리스트 모달
   ═══════════════════════════════════════════════════════════ */

.country-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.country-modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 25px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--main-brown), var(--dark-brown));
    color: var(--white);
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

#modalFlag {
    font-size: 2.5rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--white);
    color: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--white);
    color: var(--main-brown);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

/* 모달 통계 */
.modal-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #FAF8F3 0%, #F5F3EE 100%);
    border-radius: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-brown);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--main-brown);
}

.stat-item span {
    color: var(--main-brown);
    font-size: 1.3rem;
}

/* 사이트 리스트 */
.modal-site-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.site-item {
    background: var(--white);
    border: 2px solid #E8E4DC;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.site-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--main-brown);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.site-item:hover::before {
    transform: scaleY(1);
}

.site-item:hover {
    border-color: var(--gold-brown);
    background: linear-gradient(135deg, #FAF8F3 0%, #FFFFFF 100%);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(139, 111, 71, 0.15);
}

.site-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.site-info {
    flex: 1;
    min-width: 0;
}

.site-name {
    font-weight: 600;
    color: var(--dark-brown);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-url {
    font-size: 0.75rem;
    color: var(--gray-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.site-arrow {
    color: var(--main-brown);
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.site-item:hover .site-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-dark);
}

.empty-state i {
    font-size: 4rem;
    color: var(--light-brown);
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════
   반응형 디자인
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .country-stats-section {
        padding: 50px 0;
    }
    
    .country-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .country-card {
        padding: 20px;
    }
    
    .country-flag {
        font-size: 3rem;
    }
    
    .country-name {
        font-size: 1.2rem;
    }
    
    .country-count {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    #modalFlag {
        font-size: 2rem;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-site-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .country-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .country-card {
        padding: 15px;
    }
    
    .country-flag {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .country-name {
        font-size: 1rem;
    }
    
    .country-count {
        font-size: 1.6rem;
        margin: 10px 0;
    }
    
    .country-desc {
        font-size: 0.75rem;
    }
    
    .card-hover-effect {
        font-size: 0.8rem;
    }
}
