/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    background-color: #f7f9fa;
    color: #0f1419;
    line-height: 1.4;
}

a {
    text-decoration: none;
    color: #1da1f2;
}

/* コンテナ */
.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    border-left: 1px solid #ebeef0;
    border-right: 1px solid #ebeef0;
}

/* ヘッダー */
.header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 10px 15px;
    border-bottom: 1px solid #ebeef0;
    z-index: 100;
}

.header h1 {
    font-size: 20px;
    font-weight: bold;
}

/* 投稿フォーム */
.post-form {
    padding: 15px;
    border-bottom: 1px solid #ebeef0;
}

.post-form textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 16px;
    outline: none;
    min-height: 80px;
    padding: 10px 0;
}

.post-form-footer {
    display: flex;
    justify-content: flex-end;
}

.post-button {
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

.post-button:hover {
    background-color: #1a91da;
}

/* 投稿 */
.post {
    padding: 15px;
    border-bottom: 1px solid #ebeef0;
    cursor: pointer;
}

.post:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.post-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 10px;
}

.post-name {
    font-weight: bold;
    margin-right: 5px;
}

.post-time {
    color: #657786;
    font-size: 14px;
}

.post-content {
    margin-left: 58px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    margin-left: 58px;
    justify-content: space-between;
    max-width: 425px;
}

.post-action {
    display: flex;
    align-items: center;
    color: #657786;
    font-size: 14px;
}

.post-action i {
    margin-right: 5px;
}

.post-action:hover {
    color: #1da1f2;
}

.post-action.liked {
    color: #e0245e;
}

.post-action.retweeted {
    color: #17bf63;
}

/* リプライモーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    padding: 20px;
}

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

.close-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        border: none;
    }
    
    .post-actions {
        max-width: 100%;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* ローディングインジケータ */
.loading {
    text-align: center;
    padding: 20px;
    color: #657786;
}

.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(29, 161, 242, 0.3);
    border-radius: 50%;
    border-top-color: #1da1f2;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
