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

/* 내 부동산 스타일 */
.my-properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.total-value {
    font-size: 1.2em;
    color: #4CAF50;
    font-weight: bold;
}

/* 부동산 카드 */
.property-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.property-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.property-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.property-header h5 {
    margin: 0;
    color: white;
}

.property-type {
    background: rgba(52, 152, 219, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #3498db;
}

.property-info {
    margin: 15px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    color: #ddd;
}

.current-price {
    font-weight: bold;
    color: #f1c40f;
}

/* 가격 변동 애니메이션 */
.price-flash-up {
    animation: flashUp 1s;
}

.price-flash-down {
    animation: flashDown 1s;
}

@keyframes flashUp {
    0%, 100% { color: #f1c40f; }
    50% { color: #4CAF50; transform: scale(1.1); }
}

@keyframes flashDown {
    0%, 100% { color: #f1c40f; }
    50% { color: #e74c3c; transform: scale(0.9); }
}

.price-up {
    color: #4CAF50;
}

.price-down {
    color: #e74c3c;
}

/* 버튼 스타일 */
.property-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.btn-detail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-instant-sell {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-p2p-sell {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    width: 100%;
}

.btn-detail:hover,
.btn-instant-sell:hover,
.btn-p2p-sell:hover,
.btn-buy:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* P2P 매물 리스트 */
.p2p-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.p2p-listing-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.p2p-listing-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.listing-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.listing-status {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
}

.listing-info {
    margin: 10px 0;
    font-size: 0.9em;
    color: #ddd;
}

.price-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.premium {
    color: #e74c3c;
}

.discount {
    color: #4CAF50;
}

/* 통계 스타일 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.15);
}

.stat-label {
    color: #95a5a6;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
}

.region-stats table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.region-stats th,
.region-stats td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.region-stats th {
    background: rgba(255,255,255,0.05);
    color: #3498db;
    font-weight: normal;
}

.region-stats td {
    color: #ddd;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    animation: modalOpen 0.3s;
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: white;
}

.modal-body {
    margin-top: 20px;
}

.property-details {
    margin-bottom: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.detail-item label {
    color: #95a5a6;
}

.detail-item span {
    color: white;
    font-weight: bold;
}

.detail-item .highlight {
    color: #f1c40f;
    font-size: 1.2em;
}

.price-chart-container {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
}

.price-chart-container h3 {
    margin-top: 0;
    color: white;
}

/* 품귀 알림 */
.scarcity-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.scarcity-alert.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}