/* メッセージ機能のスタイル */
.messages-container {
    display: flex;
    height: calc(100vh - 200px);
    margin: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.matches-list {
    width: 300px;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.matches-list h2 {
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #eee;
    font-size: 1.2em;
    color: #333;
}

.match-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.match-item:hover {
    background-color: #f5f5f5;
}

.match-item.active {
    background-color: #e3f2fd;
}

.match-profile-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 50%;
    overflow: hidden;
}

.match-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-info {
    flex: 1;
}

.match-info h3 {
    margin: 0 0 5px;
    font-size: 1em;
}

.match-name {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.unread-badge {
    background-color: #ff4081;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.message-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.message-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.message-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    margin-bottom: 20px;
    max-width: 70%;
}

.message.sent {
    margin-left: auto;
}

.message.received {
    margin-right: auto;
}

.message-content {
    padding: 10px 15px;
    border-radius: 15px;
    background-color: #f5f5f5;
    word-wrap: break-word;
}

.message.sent .message-content {
    background-color: #e3f2fd;
}

.message-time {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

.message-form {
    display: flex;
    padding: 20px;
    border-top: 1px solid #eee;
}

.message-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    height: 40px;
    margin-right: 10px;
}

.message-form button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #2196f3;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.message-form button:hover {
    background-color: #1976d2;
}

.no-message-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

.no-matches {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* プロフィールページのスタイル */
.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.form-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #007bff;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

.required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: #0056b3;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert ul {
    margin: 0;
    padding-left: 1rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .profile-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
        background: #fff;
        border-radius: 4px;
    }
    
    .form-section {
        padding: 1rem;
    }
}

/* プロフィール画像スタイル */
.profile-image-container {
    margin: 20px auto;
    text-align: center;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4a90e2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
