* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2c3e50;
}

.stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.market, .portfolio {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.market h2, .portfolio h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.market-overview {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.market-chart-container h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #2c3e50;
}

#market-chart {
    display: flex;
    justify-content: center;
}

#market-chart canvas {
    width: 100%;
    max-width: 600px;
    height: 200px;
    border: 2px solid #007bff;
    border-radius: 8px;
    background: #ffffff;
}

.domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.domain-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9fa;
}

.domain-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.domain-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.domain-price {
    font-size: 1.1rem;
    color: #28a745;
    font-weight: 600;
    margin-bottom: 8px;
}

.domain-trend {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

.trend-stable {
    color: #6c757d;
}

.domain-category {
    font-size: 0.8rem;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-grid {
    display: grid;
    gap: 12px;
}

.portfolio-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    background: #f8f9fa;
}

.portfolio-domain {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.portfolio-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.purchase-price {
    font-size: 0.9rem;
    color: #666;
}

.current-value {
    font-size: 1rem;
    font-weight: 600;
    color: #28a745;
}

.profit-loss {
    font-size: 0.9rem;
    font-weight: 600;
}

.profit-positive {
    color: #28a745;
}

.profit-negative {
    color: #dc3545;
}

.portfolio-category {
    font-size: 0.8rem;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.empty-portfolio {
    text-align: center;
    padding: 32px;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    min-width: 300px;
}

.modal-content h3 {
    margin-bottom: 16px;
    color: #2c3e50;
}

.modal-content p {
    margin-bottom: 24px;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    width: auto;
    padding: 12px 24px;
}

@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
    }
    
    .stats {
        justify-content: center;
    }
    
    .domains-grid {
        grid-template-columns: 1fr;
    }
}