@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0a0a0a;
    --sidebar-bg: #121212;
    --card-bg: #1a1a1a;
    --primary-color: #e50914; /* Red & Black Aesthetics */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Auth Styles */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.auth-logo {
    width: 150px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

.auth-card h2 {
    margin-bottom: 25px;
    font-size: 22px;
}

.auth-card input {
    width: 100%;
    background: #121212;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    outline: none;
}

.auth-card input:focus {
    border-color: var(--primary-color);
}

.auth-card p {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-card a {
    color: var(--primary-color);
    text-decoration: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    padding: 30px 20px;
    border-right: 1px solid var(--border-color);
}

.logo {
    margin-bottom: 40px;
    text-align: center;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    filter: brightness(0) invert(1); /* Beyaz logo efekti için */
}

.sidebar nav ul li.nav-label {
    padding: 20px 0 10px 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: default;
}

.sidebar nav ul li {
    list-style: none;
    margin-bottom: 5px;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav ul li.active a, nav ul li a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* User Profile Section */
.user-profile {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    font-size: 28px;
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.15);
    border-color: var(--primary-color);
}

.metric-card h3 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.charts-section {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.chart-container {
    height: 400px;
    position: relative;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color); 
}
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); 
}

.business-selector-container {
    margin-right: 20px;
}

.business-select {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.business-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.business-select option {
    background-color: var(--card-bg);
    color: var(--text-main);
}
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.upload-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(229, 9, 20, 0.05);
}

.upload-btn svg {
    color: var(--primary-color);
}

.login-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.login-btn:hover {
    background-color: #b20710;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

/* Date Picker */
.date-picker-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.date-select {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-select:focus {
    border-color: var(--primary-color);
}

.modal-list {
    max-height: 300px;
    overflow-y: auto;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 5px;
}

.modal-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-item:hover {
    background: rgba(229, 9, 20, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.2);
}

.modal-item span {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.modal-item small {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.modal-item:active {
    transform: scale(0.98);
}

#platform-selector button {
    height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

#platform-selector button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: var(--card-bg);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease forwards;
}

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

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

.filter-btn {
    background: #333;
    color: white;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #444;
    border-color: #555;
}

/* YouTube Specific Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-card.highlight {
    border-left: 4px solid var(--primary-color);
}

.stat-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-muted);
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
}

.dashboard-section {
    margin-bottom: 50px;
}

.stats-grid.lifetime .stat-card {
    background: linear-gradient(145deg, #1a1a1a, #121212);
    border-top: 2px solid #333;
}

.stats-grid.lifetime .stat-value {
    color: var(--primary-color);
}
