/* ============================================
   Zane.org - Modernized Stylesheet v2.0
   ============================================ */

/* CSS Variables */
:root {
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-info: #06b6d4;
    
    --bg-primary: #0f172a;
    --bg-secondary: rgba(30, 41, 59, 0.5);
    --bg-tertiary: rgba(30, 41, 59, 0.3);
    --bg-card: rgba(15, 23, 42, 0.3);
    
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Main Container */
.container {
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.beta-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-danger);
    background: rgba(248, 113, 113, 0.15);
    padding: 0.375rem 0.875rem;
    border-radius: var(--border-radius-full);
    display: inline-block;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
}

.nav-button {
    font-family: inherit;
    font-weight: 500;
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    min-width: 100px;
}

.nav-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-button-logout {
    background-color: var(--color-danger);
}

.nav-button-logout:hover {
    background-color: var(--color-danger-hover);
}

/* Post Section */
.post-section {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.post-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 0;
}

textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea::placeholder {
    color: var(--text-muted);
}

/* Post Actions */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.char-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.char-count.warning {
    color: var(--color-warning);
}

.char-count.danger {
    color: var(--color-danger);
}

.primary-button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-button:hover:not(:disabled) {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Post List */
.post-list {
    margin-top: 2rem;
}

.post-card {
    background: var(--bg-card);
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

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

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-author strong {
    color: var(--text-primary);
    font-weight: 600;
}

.post-content {
    margin-bottom: 1rem;
}

.post-content p {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.action-button {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    font-size: 0.875rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.action-button:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.like-button.liked {
    background: rgba(248, 113, 113, 0.15);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.like-button.liked:hover {
    background: rgba(248, 113, 113, 0.25);
}

.action-button .icon {
    font-size: 1rem;
}

.action-button .count {
    font-weight: 600;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-owner {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-mod {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-official {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-bugtester {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Timestamp */
.timestamp {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Reply Form */
.reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 0.5rem;
    font-family: inherit;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.submit-button {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.submit-button:hover:not(:disabled) {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Replies */
.replies {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.reply-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reply-card:last-child {
    margin-bottom: 0;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.reply-header strong {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.reply-card p {
    color: var(--text-primary);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition-slow);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--color-success);
}

.toast-error {
    border-left: 4px solid var(--color-danger);
}

.toast-warning {
    border-left: 4px solid var(--color-warning);
}

.toast-info {
    border-left: 4px solid var(--color-info);
}

/* Loading States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-spinner p {
    margin: 0;
    font-size: 0.875rem;
}

/* Empty & Error States */
.empty-state,
.error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state p,
.error-state p {
    margin: 0.5rem 0;
}

.empty-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Auth Forms */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.auth-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-primary);
}

/* Update Log Styles */
.update-log {
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
}

.update-entry {
    background: rgba(30, 41, 59, 0.4);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.update-entry:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.update-version {
    background: rgba(59, 130, 246, 0.15);
    padding: 0.375rem 0.875rem;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
}

.update-content h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.update-content p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.update-changes {
    margin: 1rem 0 0 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.update-changes li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.update-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design */
@media screen and (max-width: 640px) {
    .container {
        width: 95%;
        padding: 1rem;
        margin: 1rem auto;
    }

    h1 {
        font-size: 2rem;
    }

    .main-nav {
        flex-direction: column;
    }

    .nav-link,
    .nav-button {
        width: 100%;
        text-align: center;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .reply-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }

    .auth-form {
        padding: 1.5rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline-offset: 4px;
}

/* Rules & Privacy Content */
.rules-content,
.privacy-content {
    margin-top: 2rem;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rule-item {
    background: var(--bg-card);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-primary);
    transition: var(--transition);
}

.rule-item {
    color: var(--text-primary);
    line-height: 1.6;
}

.rule-item:hover {
    transform: translateX(4px);
    border-color: rgba(59, 130, 246, 0.3);
}

.rule-item strong {
    color: var(--color-primary);
    font-weight: 600;
}

.rules-footer,
.privacy-footer {
    margin-top: 2rem;
    text-align: center;
}

.privacy-section {
    background: var(--bg-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.privacy-section h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.privacy-section p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.privacy-section ul {
    color: var(--text-secondary);
    margin-left: 1.5rem;
    margin-bottom: 0;
    line-height: 1.8;
}

.privacy-section li {
    margin-bottom: 0.5rem;
}
