/* Social Platform Specific Styles */

.post-btn {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.login-to-post-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1.3rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.login-to-post-btn:hover {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.social-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 4rem 0;
    text-align: center;
}

.social-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-hero .subtitle {
    font-size: 1.5rem;
    color: #b4b4b4;
    margin-bottom: 0.5rem;
}

.social-hero .description {
    font-size: 1.1rem;
    color: #888;
}

.social-section {
    padding: 3rem 0;
    min-height: 60vh;
}

.social-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Create Post Form (in Modal) */

.post-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.post-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    color: #888;
    font-size: 0.9rem;
}

.char-count #charCount.warning {
    color: #ff9800;
}

.char-count #charCount.error {
    color: #f44336;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.filter-group label {
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.filter-select,
.namespace-input {
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.filter-select {
    min-width: 150px;
}

.namespace-input {
    flex: 1;
    max-width: 300px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.btn-primary {
    padding: 0.6rem 1.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #0099cc;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Posts Feed */
.posts-feed {
    position: relative;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Post Card */
.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-namespace {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.post-owner {
    font-size: 0.8rem;
    color: #666;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.post-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-official {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
}

.badge-verified {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
}

.post-text {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.post-time,
.post-version {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-actions-footer {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Loading & Messages */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    display: none;
}

.status-message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #4caf50;
    display: block;
}

.status-message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    display: block;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
}

/* Quote Display */
.quoted-post {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.quoted-post .quoted-author {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-hero h1 {
        font-size: 2rem;
    }

    .social-hero .subtitle {
        font-size: 1.2rem;
    }

    .create-post-card {
        padding: 1.5rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .namespace-input {
        max-width: 100%;
    }

    .post-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .post-owner {
        font-size: 0.7rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.modal-close {
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0 0.5rem;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.asset-json-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.asset-json-container pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

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

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

/* Info Button */
.btn-info {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-info:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Info Modal Styles */
.modal-wide {
    max-width: 800px;
}

.info-modal-body {
    max-height: 69vh;
    overflow-y: auto;
}

.info-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-section {
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.info-section p {
    margin-bottom: 0.4rem;
}

.info-section strong {
    color: var(--primary-color);
}

.info-section ul,
.info-section ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.info-section li {
    margin-bottom: 0.3rem;
}

.info-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-section a:hover {
    text-decoration: underline;
}

#infoModal .modal-footer {
    justify-content: center;
    padding: 1rem 2rem;
}

#infoModal .modal-footer .btn-primary {
    padding: 0.7rem 2.5rem;
    font-size: 1rem;
    border-radius: 25px;
    display: inline-block;
    white-space: nowrap;
}
