/* リセットとベース */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #000;
    color: #0f1419;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-bottom: 1px solid rgb(239, 243, 244);
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: left;
}

.header h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.3px;
}

.header p {
    font-size: 12px;
    color: #536471;
    font-weight: 400;
    margin-top: 2px;
}

/* 新規投稿エリア */
.new-post-area {
    padding: 16px;
    border-bottom: 1px solid rgb(239, 243, 244);
    background: #fff;
}

.new-post-btn {
    width: 100%;
    padding: 12px 20px;
    background: rgb(29, 155, 240);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.new-post-btn:hover {
    background: rgb(26, 140, 216);
}

/* 投稿プレビュー */
.post-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(91, 112, 131, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.post-preview.hidden {
    display: none;
}

.preview-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.preview-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #0f1419;
    text-align: center;
}

.preview-content {
    margin-bottom: 20px;
}

.preview-content .post {
    padding: 12px 16px;
    border: 1px solid rgb(239, 243, 244);
    border-radius: 12px;
    cursor: default;
    margin-bottom: 0;
}

.preview-content .post:hover {
    background-color: transparent;
}

.post-actions-preview {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-normal-post, .btn-verified-post {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-normal-post {
    background: #fff;
    color: #0f1419;
    border: 1px solid rgb(207, 217, 222);
}

.btn-normal-post:hover {
    background: #f7f8fa;
}

.btn-verified-post {
    background: rgb(29, 155, 240);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-verified-post:hover {
    background: rgb(26, 140, 216);
}

.close-preview-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #536471;
    border: 1px solid rgb(207, 217, 222);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-preview-btn:hover {
    background: #f7f8fa;
}

/* 検証プログレス */
.verification-progress {
    padding: 16px;
    margin-top: 16px;
    background: #f7f8fa;
    border-radius: 12px;
}

.verification-progress.hidden {
    display: none;
}

.verification-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f7f8fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step.completed {
    background: #e8f5e8;
}

.step-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.spinner {
    color: #536471;
    animation: spin 1s linear infinite;
}

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

.checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 700;
    font-size: 15px;
    color: #0f1419;
    margin-bottom: 4px;
}

.step-description {
    font-size: 13px;
    color: #536471;
}


/* タイムライン */
.timeline {
    padding: 0;
}

.post {
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgb(239, 243, 244);
    transition: background-color 0.2s;
    cursor: pointer;
}

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

/* 投稿ヘッダー */
.post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.user-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
    line-height: 20px;
}

.username {
    font-weight: 700;
    font-size: 15px;
    color: #0f1419;
}

.handle {
    color: #536471;
    font-size: 15px;
    font-weight: 400;
}

.time {
    color: #536471;
    font-size: 15px;
    font-weight: 400;
}

.time::before {
    content: "·";
    margin: 0 4px;
}

/* 投稿コンテンツ */
.post-content {
    margin-left: 60px;
    margin-bottom: 12px;
}

.post-content p {
    font-size: 15px;
    margin-bottom: 12px;
    color: #0f1419;
    line-height: 20px;
}

/* 画像コンテナと認証バッジ */
.image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f7f8fa;
    border: 1px solid rgb(207, 217, 222);
}

.post-image {
    width: 100%;
    height: auto;
    max-height: 510px;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

/* 認証マーク付きの画像はクリック可能であることを示す */
.post-image.verified-clickable {
    cursor: pointer;
}

.post-image.verified-clickable:hover {
    opacity: 0.95;
}

/* 認証バッジ - 左上に配置 */
.verification-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}

.verification-badge.verified {
    background: rgba(29, 155, 240, 0.9);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.verification-badge:hover {
    transform: scale(1.15);
    background: rgb(29, 155, 240);
    box-shadow: 0 2px 6px rgba(29, 155, 240, 0.4);
}

.badge-icon {
    font-size: 13px;
    line-height: 1;
}

/* 投稿アクション */
.post-actions {
    display: flex;
    gap: 0;
    margin-top: 4px;
    margin-left: 60px;
    justify-content: space-between;
    max-width: 425px;
}

.action-btn {
    background: none;
    border: none;
    color: #536471;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.action-btn svg {
    transition: color 0.2s ease;
}

.action-btn:hover {
    color: #1d9bf0;
}

.action-btn:hover .action-icon {
    background-color: rgba(29, 155, 240, 0.1);
}

.action-btn.liked {
    color: #f91880;
}

.action-btn.liked:hover {
    color: #f91880;
}

.action-btn.liked:hover .action-icon {
    background-color: rgba(249, 24, 128, 0.1);
}

.action-btn.retweeted {
    color: #00ba7c;
}

.action-btn.retweeted:hover {
    color: #00ba7c;
}

.action-btn.retweeted:hover .action-icon {
    background-color: rgba(0, 186, 124, 0.1);
}

.action-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

/* リプライボックス */
.reply-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgb(239, 243, 244);
    background: #f7f8fa;
}

.reply-box .avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.reply-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgb(207, 217, 222);
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
}

.reply-input:focus {
    border-color: rgb(29, 155, 240);
}

.reply-send-btn {
    padding: 6px 16px;
    background: rgb(29, 155, 240);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reply-send-btn:hover {
    background: rgb(26, 140, 216);
}

/* リプライ投稿 */
.post.reply {
    background: #f7f8fa;
    margin-left: 56px;
    border-left: 2px solid rgb(207, 217, 222);
}

/* ポップアップ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(91, 112, 131, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px 24px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #536471;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(15, 20, 25, 0.1);
    color: #0f1419;
}

.popup-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f1419;
    display: flex;
    align-items: center;
    gap: 8px;
}

.photographer-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgb(239, 243, 244);
}

.verification-details {
    margin-bottom: 20px;
}

.camera-settings {
    margin-bottom: 20px;
}

.camera-settings h4 {
    font-size: 13px;
    font-weight: 700;
    color: #536471;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f7f8fa;
    border-radius: 8px;
    font-size: 14px;
}

.setting-label {
    color: #536471;
    font-weight: 400;
}

.setting-value {
    color: #0f1419;
    font-weight: 700;
}

.technical-details {
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid rgb(239, 243, 244);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #f7f8fa;
    border-radius: 8px;
    align-items: center;
}

.label {
    font-weight: 400;
    color: #536471;
    font-size: 14px;
}

.value {
    color: #0f1419;
    font-size: 14px;
    font-weight: 700;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #d1fae5;
    border-radius: 8px;
    color: #065f46;
    font-weight: 600;
    font-size: 14px;
}

.status-icon {
    color: #10b981;
    font-size: 16px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .post {
        padding: 10px 16px 4px;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .post-actions {
        margin-left: 56px;
    }
    
    .post-content {
        margin-left: 56px;
    }
    
    .avatar {
        width: 44px;
        height: 44px;
    }
    
    .verification-badge {
        width: 20px;
        height: 20px;
        top: 6px;
        left: 6px;
    }
    
    .badge-icon {
        font-size: 11px;
    }
    
    .popup-content {
        padding: 24px 20px 20px;
        margin: 16px;
        width: calc(100% - 32px);
    }
    
    .new-post-area {
        padding: 12px;
    }
    
    .preview-card {
        padding: 20px;
        margin: 16px;
        width: calc(100% - 32px);
    }
    
    .post-actions-preview {
        flex-direction: column;
    }
    
    .btn-normal-post, .btn-verified-post {
        width: 100%;
    }
    
    .reply-box {
        padding: 10px 12px;
    }
    
    .post.reply {
        margin-left: 44px;
    }
}