* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary: #1a2a6c;
  --secondary: #b21f1f;
  --accent: #3498db;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --success: #2ecc71;
  --warning: #e67e22;
  --danger: #e74c3c;
}

body {
  background: linear-gradient(135deg, #1a2a6c, #b21f1f);
  color: white;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.5) 100%);
  z-index: -1;
}

header {
  background: linear-gradient(to right, var(--primary), var(--dark));
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
  z-index: 10;
}

#delete-account-btn {
  display: none !important;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo i {
  color: var(--accent);
}

.user-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

#user-greeting {
  font-size: 0.9rem;
  color: var(--light);
}

#logout-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: all 0.3s;
}

#logout-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.main-container {
  display: flex;
  height: calc(100vh - 60px);
  padding: 0.8rem;
  gap: 0.8rem;
}

.sidebar {
  width: 220px;
  background: rgba(44, 62, 80, 0.85);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.sidebar-content {
  overflow-y: auto;
  height: 100%;
  padding-right: 5px;
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

.search-container {
  position: relative;
  margin-bottom: 1.2rem;
}

#search {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border-radius: 50px;
  border: 2px solid var(--accent);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s;
}

#search:focus {
  background: rgba(255,255,255,0.2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.search-container i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.9rem;
}

.category {
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.8rem;
}

.category h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Reduced channel button height */
.channel {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 4px 10px; /* Reduced padding */
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.channel:hover {
  background: rgba(52, 152, 219, 0.2);
  transform: translateX(3px);
  border-color: var(--accent);
}

.channel.active {
  background: rgba(52, 152, 219, 0.3);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.4);
}

.channel-icon {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.channel-name {
  font-weight: 400;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(44, 62, 80, 0.85);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#playerTitle {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.player-controls {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 10;
}

.control-btn {
  background: rgba(255,255,255,0.1);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.control-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
}

.player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.player-content.expanded {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: black;
}

.loading-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  z-index: 5;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-text {
  font-size: 1rem;
  color: var(--accent);
}

#player-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: black;
  flex: 1;
}

/* Login Modal */
#login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.login-container {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  padding: 2.5rem;
  border-radius: 15px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
}

.login-container h2 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.input-group {
  margin-bottom: 1.2rem;
  position: relative;
}

.input-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.input-group input:focus {
  background: rgba(255,255,255,0.2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.remember-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0.8rem 0;
  justify-content: center;
  font-size: 0.9rem;
}

.remember-group input {
  width: 16px;
  height: 16px;
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-top: 1.2rem;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(to right, #4CAF50, #2196F3);
  color: white;
  transition: background 0.3s;
}

.action-btn:hover {
  background: linear-gradient(to right, #2196F3, #4CAF50);
}

/* Login button - Green */
.login-btn {
  background: linear-gradient(to right, #4caf50, #388e3c);
  color: white;
}

.login-btn:hover {
  background: linear-gradient(to right, #388e3c, #4caf50);
}

/* Sign Up button - Light Blue */
.signup-btn {
  background: linear-gradient(to right, #03a9f4, #0288d1);
  color: white;
}

.signup-btn:hover {
  background: linear-gradient(to right, #0288d1, #03a9f4);
}

/* Reset Password button - Grey */
.reset-btn {
  background: linear-gradient(to right, #9e9e9e, #757575);
  color: white;
}

.reset-btn:hover {
  background: linear-gradient(to right, #757575, #9e9e9e);
}

/* Delete Account button - Red (for reference) */
.delete-btn {
  background: linear-gradient(to right, #e53935, #d32f2f);
  color: white;
}

.delete-btn:hover {
  background: linear-gradient(to right, #d32f2f, #e53935);
}

/* Smaller width for reset and delete buttons */
.reset-btn,
.delete-btn {
  width: 140px;
  padding: 6px 10px; /* Slimmer height */
  font-size: 14px;
  margin-right: 10px;
}


/* Optional: Make login/signup buttons stretch full width of row */
.login-btn,
.signup-btn {
  flex: 1;
  padding: 12px;
  font-size: 16px;
}


.error-message {
  color: var(--danger);
  margin-top: 0.5rem;
  display: none;
  font-weight: 400;
  font-size: 0.9rem;
}

/* Fullscreen overlay */
#fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 300; /* Higher z-index */
  display: none;
}

#fullscreen-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#close-fullscreen {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 301;
}

/* Expand button styles */
.expanded-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 101;
}

.expanded-controls .control-btn {
  background: rgba(0,0,0,0.5);
}

/* Channel error message */
.channel-error {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: #000;
  color: #fff;
  padding: 20px;
  text-align: center;
}

.channel-error button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  margin-top: 15px;
  font-weight: 600;
  transition: all 0.3s;
}

.channel-error button:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

/* Mobile responsiveness */
@media (max-width: 992px) {
  .main-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    max-height: 35vh;
  }
  
  .player-container {
    height: 60vh;
  }
  
  .player-content.expanded {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
  }
}



@media (max-width: 576px) {
  header {
    flex-direction: column;
    gap: 10px;
    padding: 0.8rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .login-container {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .player-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .player-controls {
    align-self: flex-end;
  }

#error-message {
  display: none;
  color: red;
}

/* Ensure iframe fills container */
.fullscreen-mode iframe {
  width: 100% !important;
  height: 100% !important;
}

/* At the end of style.css */
#launch-fullscreen-btn {
  margin-left: auto;
  margin-right: 20px;
  padding: 6px 12px;
  font-size: 14px;
  background-color: black;       /* use background-color instead of background with a comment */
  color: white;                  /* ensures text and icon stay white */
  border: none;
  border-radius: 6px;
  cursor: pointer;               /* this sets the pointer cursor on hover, not color */
}
}

