/* Custom styles for YouTube Rank Checker */

:root {
  --primary-color: #ff0000;
  --secondary-color: #282828;
  --accent-color: #4285f4;
  --light-gray: #f8f9fa;
  --dark-gray: #343a40;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-color: #333;
  --light-text: #f8f9fa;
}

body {
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  background-color: #f8f9fa;
  color: var(--text-color);
}

/* Header & Navigation */
.navbar {
  background-color: var(--secondary-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand span {
  color: var(--primary-color);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.7rem 1rem;
  transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.navbar-dark .navbar-nav .active > .nav-link {
  color: #fff !important;
  background-color: var(--primary-color);
  border-radius: 4px;
}

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.card-header h4 {
  margin-bottom: 0;
  font-size: 1.2rem;
  color: var(--secondary-color);
}

/* Video cards */
.video-card {
  overflow: hidden;
}

.video-card img {
  transition: transform 0.5s ease;
}

.video-card:hover img {
  transform: scale(1.05);
}

.video-card .card-footer {
  background-color: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dashboard stats */
.dashboard-stats {
  text-align: center;
  padding: 20px;
}

.dashboard-stats .number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.dashboard-stats .label {
  font-size: 1rem;
  color: var(--dark-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Rank badges */
.rank-badge {
  font-size: 1.2rem;
  padding: 0.5rem 0.75rem;
  border-radius: 50px;
}

/* Buttons */
.btn {
  border-radius: 4px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-primary:hover {
  background-color: #3367d6;
  border-color: #3367d6;
}

.btn-danger {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-danger:hover {
  background-color: #cc0000;
  border-color: #cc0000;
}

/* Forms */
.form-control {
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
}

/* Tables */
.table {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: var(--light-gray);
  border-bottom: 2px solid #dee2e6;
  color: var(--dark-gray);
  font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer p {
  margin-bottom: 0;
}

/* Jumbotron */
.jumbotron {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: #fff;
  border-radius: 8px;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
}

.jumbotron h1 {
  font-weight: 700;
}

/* Charts */
.rank-history-chart {
  height: 300px;
  width: 100%;
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-stats .number {
    font-size: 2rem;
  }
  
  .jumbotron {
    padding: 2rem 1rem;
  }
}

/* Custom animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Custom YouTube-like loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  margin: 40px auto;
  background-color: var(--primary-color);
  border-radius: 100%;  
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

@keyframes sk-scaleout {
  0% { 
    transform: scale(0);
  } 100% {
    transform: scale(1.0);
    opacity: 0;
  }
}

/* Custom switch for toggle buttons */
.custom-switch .custom-control-label::before {
  width: 2rem;
  height: 1rem;
  border-radius: 1rem;
}

.custom-switch .custom-control-label::after {
  width: calc(1rem - 4px);
  height: calc(1rem - 4px);
  border-radius: 50%;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
  transform: translateX(1rem);
}

/* Rank change indicators */
.rank-up {
  color: var(--success-color);
}

.rank-down {
  color: var(--danger-color);
}

.rank-same {
  color: var(--warning-color);
}
