/* ========================================
   Venting - Pure Black Glass Theme
   Responsive 3/4 Width Layout
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #1d9bf0;
    --accent-glow: rgba(29, 155, 240, 0.5);
    --success: #00ba7c;
    --error: #f4212e;
    --warning: #ffd400;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(29, 155, 240, 0.3); }
    50% { box-shadow: 0 0 40px rgba(29, 155, 240, 0.6); }
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(circle at 20% 30%, rgba(29, 155, 240, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 33, 46, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 186, 124, 0.04) 0%, transparent 60%),
        #000000;
}

/* Container - 75% width */
.container {
    width: 75%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}

/* Header - Half size */
.header {
    margin-bottom: 24px;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease-out;
}

.header:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(29, 155, 240, 0.15);
    transform: translateY(-2px);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
    filter: drop-shadow(0 0 10px var(--accent-glow));
    animation: float 3s ease-in-out infinite;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Compose Box */
.compose-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease-out 0.1s both;
}

.compose-box:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(29, 155, 240, 0.1);
    transform: translateY(-2px);
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.anonymous-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(29, 155, 240, 0.15);
    border: 1px solid rgba(29, 155, 240, 0.3);
    border-radius: 20px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(29, 155, 240, 0.2);
    animation: glow 2s ease-in-out infinite;
}

.anonymous-indicator svg {
    width: 16px;
    height: 16px;
}

.char-counter {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.char-counter #charCount {
    color: var(--text-primary);
}

.char-counter.warning #charCount {
    color: var(--warning);
    animation: pulse 1s ease-in-out infinite;
}

.char-counter.error #charCount {
    color: var(--error);
    animation: pulse 0.5s ease-in-out infinite;
}

#postContent {
    width: 100%;
    min-height: 100px;
    max-height: 300px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

#postContent::placeholder {
    color: var(--text-secondary);
}

#postContent:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(29, 155, 240, 0.15),
        0 0 30px rgba(29, 155, 240, 0.3),
        inset 0 0 60px rgba(29, 155, 240, 0.05);
    transform: scale(1.01);
}

.compose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.auto-refresh-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.refresh-icon {
    width: 14px;
    height: 14px;
    color: var(--accent);
    animation: rotate 3s linear infinite;
}

.post-btn {
    padding: 10px 32px;
    background: rgba(29, 155, 240, 0.2);
    border: 1px solid rgba(29, 155, 240, 0.4);
    border-radius: 24px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.post-btn:hover:not(:disabled)::before {
    left: 100%;
}

.post-btn:hover:not(:disabled) {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow:
        0 4px 20px rgba(29, 155, 240, 0.5),
        0 0 40px rgba(29, 155, 240, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
}

.post-btn:active:not(:disabled) {
    transform: translateY(0) scale(1);
    box-shadow:
        0 2px 10px rgba(29, 155, 240, 0.6),
        0 0 50px rgba(29, 155, 240, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.post-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Timeline */
.timeline {
    margin-bottom: 24px;
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.timeline-header:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.timeline-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.post-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Posts */
.posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.5s ease-out both;
}

.post:nth-child(1) { animation-delay: 0s; }
.post:nth-child(2) { animation-delay: 0.05s; }
.post:nth-child(3) { animation-delay: 0.1s; }
.post:nth-child(4) { animation-delay: 0.15s; }
.post:nth-child(5) { animation-delay: 0.2s; }

.post:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(29, 155, 240, 0.15),
        inset 0 0 30px rgba(29, 155, 240, 0.05);
    transform: translateY(-4px) scale(1.01);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.post:hover .post-avatar {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 0 30px rgba(29, 155, 240, 0.4);
}

.post-meta {
    flex: 1;
}

.post-author {
    font-weight: 700;
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
}

.post-time {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.post:hover .post-time {
    color: var(--accent);
}

.post-content {
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(29, 155, 240, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty {
    text-align: center;
    padding: 60px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    animation: slideInUp 0.6s ease-out;
}

.empty svg {
    width: 64px;
    height: 64px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

.empty h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.6s ease-out 0.3s both;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pagination-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(29, 155, 240, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.pagination-btn:hover:not(:disabled)::before {
    width: 200px;
    height: 200px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow:
        0 4px 12px rgba(29, 155, 240, 0.3),
        0 0 30px rgba(29, 155, 240, 0.2);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 18px;
    height: 18px;
    position: relative;
    z-index: 1;
}

.pagination-btn span {
    position: relative;
    z-index: 1;
}

.page-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(29, 155, 240, 0.3);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
    animation: glow 1s ease-in-out infinite;
}

.notification.success {
    border-color: var(--success);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 186, 124, 0.4);
}

.notification.error {
    border-color: var(--error);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(244, 33, 46, 0.4);
}

/* Responsive - Smartphones */
@media (max-width: 768px) {
    .container {
        width: 90%;
        padding: 12px;
    }

    .header {
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo svg {
        width: 24px;
        height: 24px;
    }

    .compose-box {
        padding: 16px;
    }

    .post {
        padding: 16px;
    }

    .notification {
        right: 12px;
        left: 12px;
        top: 12px;
    }

    .pagination {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }

    .compose-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .post-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(29, 155, 240, 0.3);
    border-radius: 5px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(29, 155, 240, 0.6);
    box-shadow: 0 0 10px rgba(29, 155, 240, 0.5);
}

/* Selection */
::selection {
    background: rgba(29, 155, 240, 0.3);
    color: var(--text-primary);
}

/* Online Users Indicator */
.online-users-indicator {
    position: fixed !important;
    bottom: 20px;
    left: 20px;
    right: auto !important;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 186, 124, 0.3);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 186, 124, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease-out 0.5s both;
}

.online-users-indicator:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--success);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 186, 124, 0.4);
    transform: translateY(-2px);
}

.online-users-indicator .online-icon {
    width: 16px;
    height: 16px;
    color: var(--success);
}

.online-users-indicator .pulse {
    animation: pulse 2s ease-in-out infinite;
    transform-origin: center;
}

#onlineUsersCount {
    font-weight: 700;
    font-size: 14px;
}

@media (max-width: 768px) {
    .online-users-indicator {
        position: fixed !important;
        bottom: 12px;
        left: 12px;
        right: auto !important;
        padding: 8px 12px;
        font-size: 12px;
    }

    .online-users-indicator .online-icon {
        width: 14px;
        height: 14px;
    }

    #onlineUsersCount {
        font-size: 13px;
    }

    .creator-brand {
        bottom: 12px;
        right: 12px;
    }

    .compose-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .char-counter {
        font-size: 12px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .timeline-header h2 {
        font-size: 18px;
    }

    .post-meta {
        font-size: 12px;
    }

    .post-content {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 8px;
    }

    .header {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .logo svg {
        width: 20px;
        height: 20px;
    }

    .compose-box {
        padding: 12px;
    }

    #postContent {
        font-size: 14px;
        min-height: 80px;
    }

    .post {
        padding: 12px;
    }

    .post-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .online-users-indicator {
        position: fixed !important;
        bottom: 10px;
        left: 8px;
        right: auto !important;
        padding: 6px 10px;
        font-size: 11px;
    }

    .online-users-indicator .online-icon {
        width: 12px;
        height: 12px;
    }

    #onlineUsersCount {
        font-size: 12px;
    }

    .creator-brand {
        position: fixed !important;
        bottom: 10px;
        right: 10px;
        left: auto !important;
        font-size: 11px;
        padding: 6px 14px;
    }

    .brand-text::before {
        font-size: 10px;
    }
}

/* Creator Branding */
.creator-brand {
    position: fixed !important;
    bottom: 20px;
    right: 20px;
    left: auto !important;
    z-index: 998;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.8s ease-out 1s both;
}

.creator-brand:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(29, 155, 240, 0.4);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(29, 155, 240, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.05);
}

.brand-text {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #1d9bf0 50%,
        #00ba7c 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    filter: brightness(1.1);
}

.brand-text::before {
    content: '☣︎ ';
    font-size: 12px;
    -webkit-text-fill-color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(29, 155, 240, 0.6));
    animation: pulse 2s ease-in-out infinite;
}

.creator-brand:hover .brand-text {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #1d9bf0 30%,
        #00ba7c 60%,
        #ffd400 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(29, 155, 240, 0.5));
}
