/* 한국 부동산 시스템 스타일 */

/* 기본 유틸리티 클래스 */
.hidden {
    display: none !important;
}

/* 서브탭 컨테이너 */
.real-estate-sub-tab {
    display: block;
}

.real-estate-sub-tab.hidden {
    display: none !important;
}

/* 서브탭 */
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #374151;
}

.sub-tab-btn {
    padding: 10px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.sub-tab-btn:hover {
    color: white;
}

.sub-tab-btn.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

/* 품귀 알림 */
.scarcity-alerts-container {
    margin-bottom: 20px;
}

.scarcity-alert {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pulse 2s infinite;
}

.scarcity-alert.scarcity-극심 {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
}

.scarcity-alert.scarcity-심각 {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: white;
}

.scarcity-alert.scarcity-경고 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.alert-icon {
    font-size: 20px;
}

.alert-text {
    flex: 1;
    font-weight: 500;
}

/* 내 부동산 */
.properties-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.summary-item {
    background: #1f2937;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #374151;
}

.summary-item span {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 5px;
}

.summary-item strong {
    display: block;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.summary-item strong.profit {
    color: #10b981;
}

.summary-item strong.loss {
    color: #ef4444;
}

.my-properties-list {
    display: grid;
    gap: 15px;
}

.my-property-item {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.my-property-item:hover {
    background: #374151;
    transform: translateY(-2px);
}

.property-value {
    margin-top: 5px;
    color: #10b981;
    font-weight: 500;
}

.base-price {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-left: 10px;
}

.listing-status {
    margin-top: 5px;
    padding: 5px 10px;
    background: #059669;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

/* P2P 거래소 */
.p2p-listing-item {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.p2p-listing-item:hover {
    background: #374151;
    transform: translateY(-2px);
}

.listing-info {
    flex: 1;
}

.asset-name {
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.asset-location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 5px;
}

.price-info {
    margin: 10px 0;
}

.listing-price {
    color: #fbbf24;
    font-size: 18px;
    font-weight: 600;
}

.market-price {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-left: 10px;
}

.seller-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.my-listing {
    padding: 8px 15px;
    background: #374151;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    font-size: 12px;
}

/* 판매 다이얼로그 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 25px;
    max-width: 450px;
    width: 90%;
}

.sell-dialog h3 {
    color: white;
    margin-bottom: 20px;
}

.sell-dialog .property-info {
    background: #111827;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sell-dialog .property-info p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.8);
}

.price-input-group {
    margin-bottom: 20px;
}

.price-input-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.price-input-group input {
    width: 100%;
    padding: 10px;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 6px;
    color: white;
    font-size: 16px;
}

.price-input-group small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.modal-actions .btn-primary {
    background: #10b981;
    color: white;
}

.modal-actions .btn-primary:hover {
    background: #059669;
}

.modal-actions .btn-secondary {
    background: #374151;
    color: white;
}

.modal-actions .btn-secondary:hover {
    background: #4b5563;
}

/* 통계 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 15px;
}

.stat-card h4 {
    color: #10b981;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-card p {
    color: rgba(255, 255, 255, 0.8);
    margin: 5px 0;
    font-size: 13px;
}

/* 부동산 아이템 개선 */
.property-item {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.property-item:hover {
    background: #374151;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.property-info {
    flex: 1;
}

.property-name {
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.property-location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 5px;
}

.property-price {
    color: #fbbf24;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.property-development {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.property-actions {
    display: flex;
    gap: 10px;
}

.btn-buy, .btn-sell, .btn-cancel {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-buy {
    background: #10b981;
    color: white;
}

.btn-buy:hover {
    background: #059669;
}

.btn-sell {
    background: #f59e0b;
    color: white;
}

.btn-sell:hover {
    background: #d97706;
}

.btn-cancel {
    background: #ef4444;
    color: white;
}

.btn-cancel:hover {
    background: #dc2626;
}

/* 애니메이션 */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .sub-tabs {
        flex-wrap: wrap;
    }

    .sub-tab-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .properties-summary {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .property-item,
    .my-property-item,
    .p2p-listing-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-actions,
    .listing-actions {
        width: 100%;
        margin-top: 10px;
    }

    .property-actions button,
    .listing-actions button {
        width: 100%;
    }
}