/* PointOfView.live - Main Stylesheet */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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);
    
    --max-width: 1280px;
    --header-height: 70px;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ===== Container ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header & Navigation ===== */
.main-header {
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    height: var(--header-height);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.btn-nav {
    background: var(--primary-color);
    color: white !important;
    padding: 10px 20px !important;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

.admin-link {
    color: var(--warning-color) !important;
    font-weight: 600 !important;
    background: rgba(245, 158, 11, 0.1) !important;
    padding: 8px 16px !important;
    border-radius: var(--border-radius) !important;
}

.admin-link:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    color: var(--warning-color) !important;
}

.dropdown-menu .divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
    list-style: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    padding: 8px 0;
    display: none;
    z-index: 100;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-primary);
}

.dropdown-menu a:hover {
    background: var(--bg-tertiary);
}

/* ===== Alert Messages ===== */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - var(--header-height) - 200px);
    padding: 40px 0;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== Cards ===== */
.debate-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.debate-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.debate-card h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.topic {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.participants {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.participant {
    color: var(--text-secondary);
    font-weight: 500;
}

.vs {
    background: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
}

.scores {
    display: flex;
    gap: 20px;
}

.score {
    display: flex;
    align-items: center;
    gap: 5px;
}

.score .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.score .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* ===== Grid Layouts ===== */
.debates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sponsor-item {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.sponsor-item:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.sponsor-item img {
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.sponsor-item:hover img {
    filter: grayscale(0%);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* ===== Filter Section ===== */
.filter-section {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.topic-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.topic-filter label {
    font-weight: 600;
}

.topic-filter select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    min-width: 200px;
}

/* ===== Debate View Page ===== */
.debate-view {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb span {
    color: var(--text-primary);
}

.debate-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.topic-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
}

.debate-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.audio-section {
    margin: 30px 0;
}

.audio-player-wrapper {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
}

audio {
    width: 100%;
}

.participants-section {
    margin: 40px 0;
}

.participants-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-top: 20px;
}

.participant-card {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.participant-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.stance {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.score-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-label {
    font-size: 14px;
    color: var(--text-muted);
}

.score-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-color);
}

.vs-divider {
    font-size: 32px;
    font-weight: 800;
    color: var(--danger-color);
}

/* ===== Comments ===== */
.comments-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.comment-form-wrapper {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.comment {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-date {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Admin Panel ===== */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    min-height: calc(100vh - var(--header-height) - 80px);
}

.admin-sidebar {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-item .icon {
    font-size: 20px;
}

.nav-item .badge {
    position: absolute;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 15px 0;
}

.admin-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 25px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.stat-card.highlight {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
}

.stat-card.success {
    background: linear-gradient(135deg, #d1fae5, #6ee7b7);
}

.stat-icon {
    font-size: 40px;
}

.stat-details h3 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-action {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    padding: 4px 8px;
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.admin-table th {
    background: var(--bg-tertiary);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tr:hover {
    background: var(--bg-secondary);
}

.actions {
    display: flex;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.page-info {
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.main-footer {
    background: var(--text-primary);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-primary);
        flex-direction: column;
        padding: 30px;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
        align-items: flex-start;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .debates-grid {
        grid-template-columns: 1fr;
    }
    
    .participants-grid {
        grid-template-columns: 1fr;
    }
    
    .vs-divider {
        transform: rotate(90deg);
    }
    
    .debate-view {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.no-debates,
.no-results,
.no-comments,
.no-suggestions {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.info-box {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 30px;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.info-box ul,
.info-box ol {
    margin-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
}

/* ===== Loading States ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}