/* Override default grid when showing board columns */
#projectsGrid {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Board Column Layout */
.board-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    min-height: 600px;
    width: 100%;
}

/* Ensure proper width inheritance */
.projects-section #projectsGrid {
    width: 100%;
}

.projects-section .board-columns {
    width: 100%;
    max-width: 100%;
}

/* Force full width for board view - high specificity */
body .main-content .projects-section .board-columns {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.board-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Allow columns to shrink */
}

.column-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.column-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.column-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
}

/* Status-specific colors */
.board-column[data-status="Backlog"] .column-header {
    border-left: 4px solid #6b7280;
    padding-left: 16px;
}

.board-column[data-status="Ready"] .column-header {
    border-left: 4px solid #3b82f6;
    padding-left: 16px;
}

.board-column[data-status="In Progress"] .column-header {
    border-left: 4px solid #f59e0b;
    padding-left: 16px;
}

.board-column[data-status="In Review"] .column-header {
    border-left: 4px solid #8b5cf6;
    padding-left: 16px;
}

/* Project Cards in Columns */
.column-content .project-card {
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.column-content .project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.column-content .project-card:last-child {
    margin-bottom: 0;
}

/* Compact card design for columns */
.column-content .project-title {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.column-content .project-description {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.column-content .project-meta {
    font-size: 11px;
    margin-bottom: 10px;
}

.column-content .meta-avatar {
    width: 16px;
    height: 16px;
}

.column-content .project-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.column-content .vote-btn {
    padding: 4px 8px;
    font-size: 11px;
}

.column-content .project-keywords {
    margin-top: 8px;
}

.column-content .keyword-tag {
    font-size: 10px;
    padding: 2px 6px;
}

/* Empty column state */
.empty-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    text-align: center;
}

.empty-column i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-column p {
    margin: 0;
    font-size: 14px;
}

/* Authentication UI */
.auth-section {
    display: flex;
    align-items: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.light-modal {
    color: #1a1a1a;
}

.light-modal h3 {
    color: #1a1a1a;
    font-size: 24px;
    margin-bottom: 12px;
}

.light-modal h4 {
    color: #333;
    font-size: 18px;
    margin-bottom: 12px;
}

.auth-intro {
    color: #666;
    font-size: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.login-options {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.login-option {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.login-option h4 {
    margin-bottom: 16px;
}

.helper-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 12px;
}

.why-github {
    background: #f0f9ff;
    border: 1px solid #cfe2ff;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.why-github h4 {
    color: #0969da;
    margin-bottom: 12px;
}

.why-github ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.why-github li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #495057;
}

.why-github li i {
    color: #28a745;
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.pat-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    margin: 16px 0;
}

.pat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.auth-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 12px;
    text-align: center;
}

.auth-security {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-top: 20px;
}

.auth-security i {
    color: #10b981;
    font-size: 20px;
    flex-shrink: 0;
}

.auth-security p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    z-index: 1001;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Vote Button Active State */
.vote-btn.active {
    background: var(--primary-color);
    color: white;
}

.vote-btn.active:hover {
    background: var(--primary-hover);
}

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

.loading-spinner i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1400px) {
    .board-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .board-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .board-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .column-content {
        max-height: 400px;
    }
    
    .auth-modal-content {
        padding: 24px;
    }
}

/* Modal Styles */
.issue-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.issue-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-body {
    padding: 20px 0;
}

.issue-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 20px 0;
}

.issue-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* Modal Content - Light Theme Override */
#modalContent .modal-header {
    margin-bottom: 20px;
}

#modalContent .modal-header h2 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

#modalContent .modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

#modalContent .project-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #e3f2fd;
    color: #1976d2;
}

#modalContent .btn-text {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#modalContent .btn-text:hover {
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-section {
    display: flex;
    gap: 12px;
    align-items: center;
}

.vote-btn.large {
    padding: 8px 16px;
    font-size: 14px;
}

.view-count {
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.light-modal .modal-close {
    color: #6c757d;
}

.light-modal .modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

/* GitHub Login */
.github-login {
    text-align: center;
    padding: 20px 0;
}

.github-login h3 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-github {
    background: #24292e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-github:hover {
    background: #1a1e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-github-nav {
    background: transparent;
    color: #24292e;
    border: 1px solid #d1d5da;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-github-nav:hover {
    background: #f6f8fa;
    border-color: #24292e;
    color: #24292e;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-github-small {
    background: #24292e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-github-small:hover {
    background: #1a1e22;
    transform: translateY(-1px);
}

.auth-instructions {
    text-align: left;
    margin-top: 20px;
}

.auth-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.auth-option h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.auth-option ol {
    margin: 12px 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
}

.auth-option .btn-primary,
.auth-option .btn-secondary {
    margin-top: 12px;
}

/* Auth Options Grid */
.auth-options {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}

.auth-option.primary {
    background: #e3f2fd;
    border-color: #1976d2;
}

/* Device Flow Styles */
.device-flow {
    text-align: center;
    padding: 20px 0;
}

.device-code-display {
    margin: 24px 0;
}

.code-box {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 4px;
    padding: 16px 24px;
    background: #f5f5f5;
    border: 2px dashed #1976d2;
    border-radius: 8px;
    margin: 12px 0;
    font-family: 'JetBrains Mono', monospace;
}

.device-steps {
    text-align: left;
    max-width: 400px;
    margin: 24px auto;
}

.device-steps ol {
    padding-left: 20px;
    line-height: 1.8;
}

.device-waiting {
    margin-top: 24px;
    color: #666;
}

.device-waiting i {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Backend Required */
.backend-required {
    text-align: center;
    padding: 20px;
}

.backend-required code {
    display: block;
    margin: 12px 0;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
}

.link-primary {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.link-primary:hover {
    text-decoration: underline;
}

/* Comments Section */
.comments-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-comment {
    margin-bottom: 24px;
}

.add-comment textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 12px;
}

.add-comment textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.login-prompt {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 24px;
}

.login-prompt p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-meta {
    flex: 1;
}

.comment-meta strong {
    display: block;
    margin-bottom: 2px;
}

.comment-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.comment-body p {
    margin-bottom: 8px;
}

.comment-body p:last-child {
    margin-bottom: 0;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 0;
    font-style: italic;
}

/* Setup Options */
.setup-options {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.setup-option {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.setup-option h4 {
    margin-bottom: 12px;
    color: #495057;
}

.setup-option ol {
    margin: 12px 0;
    padding-left: 20px;
}

.setup-option ul {
    margin: 8px 0 8px 20px;
    font-size: 14px;
}

.setup-option code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 13px;
}

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: #6c757d;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #dee2e6;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.auth-alternatives {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
}

.debug-info {
    margin-top: 24px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}

.debug-info summary {
    cursor: pointer;
    color: #6c757d;
}

.debug-info code {
    font-size: 12px;
}