/* Custom styles for the Streaming Service Helper application */

/* Force dark mode on all elements */
:root {
    color-scheme: dark !important;
}

html, body {
    background-color: #212529 !important;
    color: #f8f9fa !important;
}

.dark-mode {
    color-scheme: dark !important;
    background-color: #212529 !important;
    color: #f8f9fa !important;
}

/* Force background colors on common elements */
.card, .modal-content, .dropdown-menu, .list-group-item {
    background-color: #2b3035 !important;
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

.bg-light, .bg-white {
    background-color: #2b3035 !important;
}

/* Force text color on form elements */
input, select, textarea, .form-control, .form-select {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

/* Make sure buttons have proper contrast */
.btn-light, .btn-outline-dark, .btn-outline-primary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info {
    background-color: #343a40 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Improve contrast on all buttons */
.btn {
    font-weight: bold !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
}

/* Specific fix for red buttons */
.btn-danger, .btn-outline-danger {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: bold !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
    background-color: #dc3545 !important;
    border: 2px solid #b02a37 !important;
}

/* Ensure text on red backgrounds has strong contrast */
.bg-danger, .alert-danger, .btn-danger {
    color: white !important;
    font-weight: bold !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

/* Specific fix for primary buttons */
.btn-primary {
    color: #ffffff !important; 
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Make sure modals have dark backgrounds */
.modal, .modal-content, .modal-header, .modal-body, .modal-footer {
    background-color: #212529 !important;
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

/* Copy key styling */
.copy-key, .copy-other-key {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
    display: inline-block;
}

.copy-key:hover, .copy-other-key:hover {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.copy-key:active, .copy-other-key:active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(1px);
}

/* Copy animation */
@keyframes copyFlash {
    0% { background-color: transparent; transform: scale(1); }
    30% { background-color: var(--bs-success); transform: scale(1.05); }
    100% { background-color: transparent; transform: scale(1); }
}

.copy-animation {
    animation: copyFlash 0.5s ease;
}

/* Toast styling */
.toast {
    opacity: 1 !important;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    animation: toastIn 0.3s ease-in-out;
}

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

.toast.hide {
    animation: toastOut 0.3s ease-in-out forwards;
}

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

.toast-header {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-body pre {
    max-height: 150px;
    overflow-y: auto;
}

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

/* Flash messages */
.alert {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
}

.alert-danger, .alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.2);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
}

/* Animated elements */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Copyable elements */
.copyable {
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.copyable:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.copyable:after {
    content: 'Click to copy';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.copyable:hover:after {
    opacity: 1;
}

.copyable.copied:after {
    content: 'Copied!';
    background-color: rgba(25, 135, 84, 0.7);
}

/* Centered pre tags */
.centered-pre {
    display: block;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 15px auto;
    padding: 10px;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    max-width: 100%;
    overflow-x: auto;
}

/* Chat window styling */
.chat-window {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #343a40;
}

.message {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    max-width: 80%;
    word-wrap: break-word;
}

.message-ai {
    background-color: #212529;
    color: #f8f9fa;
    align-self: flex-start;
    margin-right: auto;
}

.message-user {
    background-color: #0d6efd;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.chat-input-container {
    padding: 1rem;
    background-color: #2b3035;
    border-top: 1px solid #495057;
}

/* AI Chat Button Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

#aiChatButton {
    animation: pulse 2s infinite;
}

/* Chat fab button */
.chat-fab-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.7);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    transition: all 0.3s ease;
}

.chat-fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.8);
}


/* Chat float button */
.chat-float-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.7);
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer styling */
.footer {
    margin-top: auto;
    padding: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .option-card {
        margin-bottom: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-window {
        height: 350px;
    }
}


/* Chat float button */
.chat-float-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.7);
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced footer styling */
.footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-icon {
    transition: all 0.3s ease;
    font-size: 1.2rem;
    opacity: 0.8;
}

.footer-icon:hover {
    opacity: 1;
    transform: translateY(-3px);
}

@media (max-width: 767px) {
    .footer p {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer .col-md-6.text-md-end {
        text-align: center;
    }
}

/* Chat fab button */
.chat-fab-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.7);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    transition: all 0.3s ease;
}

.chat-fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.8);
}

/* Facebook-inspired Additional Styles */

/* Additional rounded corners */
.list-group {
  border-radius: 12px !important;
  overflow: hidden;
}

.list-group-item {
  background-color: var(--neutral-medium);
  border-color: var(--neutral-border);
}

.list-group-item:hover {
  background-color: var(--neutral-light);
}

/* More rounded inputs */
.form-control, .input-group-text, .form-select {
  border-radius: 20px !important;
  padding-left: 15px;
  padding-right: 15px;
}

/* Facebook-style hover feedback */
.btn:hover {
  filter: brightness(1.1);
}

/* Floating action button style */
.floating-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1050;
  transition: all 0.3s ease;
}

.floating-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.floating-button i {
  font-size: 24px;
}

/* Pill-shaped buttons for key actions */
.btn-pill {
  border-radius: 50px !important;
  padding-left: 20px;
  padding-right: 20px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Facebook-style date pill */
.date-pill {
  background-color: var(--neutral-light);
  border-radius: 20px !important;
  padding: 5px 15px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: inline-block;
}

/* Facebook-style toggle */
.fb-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.fb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fb-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--neutral-light);
  transition: .4s;
  border-radius: 34px;
}

.fb-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .fb-toggle-slider {
  background-color: var(--primary-color);
}

input:checked + .fb-toggle-slider:before {
  transform: translateX(24px);
}

/* Facebook-style shimmer effect on loading */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, var(--neutral-medium) 8%, var(--neutral-light) 18%, var(--neutral-medium) 33%);
  background-size: 1000px 100%;
}

/* Service logo containers */
.service-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--neutral-light);
  margin-right: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.netflix-logo {
  background-color: #e50914;
}

.disney-logo {
  background-color: #1a46a6;
}

.hulu-logo {
  background-color: #1ce783;
}

.max-logo {
  background-color: #7d3bff;
}

.amazon-logo {
  background-color: #00a8e1;
}

/* Facebook-style notification dot */
.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-color);
  position: absolute;
  top: 0;
  right: 0;
  box-shadow: 0 0 0 2px var(--neutral-medium);
}

/* Apply Facebook-style font sizing */
body {
  font-size: 14px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

h4 {
  font-size: 16px;
  font-weight: 600;
}

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

/* Facebook-style chat window */
.chat-container {
  border-radius: 20px 20px 0 0 !important;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* More rounded elements for Facebook-style UI */

/* Make all buttons more rounded */
.btn {
  border-radius: 20px !important;
}

/* Make all cards more rounded */
.card {
  border-radius: 15px !important;
  overflow: hidden;
}

.card-header {
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
}

.card-footer {
  border-bottom-left-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
}

/* Round the profile buttons */
.dropdown-menu {
  border-radius: 15px !important;
  overflow: hidden;
  padding: 8px;
}

/* Make toast notifications more rounded */
.toast {
  border-radius: 15px !important;
}

/* Rounded service icons */
.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Custom background colors for new elements */
.bg-purple {
  background-color: #8a2be2 !important;
}

/* Facebook-style search box */
.form-control.search-input {
  border-radius: 50px !important;
  background-color: var(--neutral-light);
  border: none;
  padding-left: 20px;
  padding-right: 20px;
}

/* Facebook-style navigation tabs */
.nav-tabs {
  border-bottom: none;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 8px !important;
  color: var(--text-secondary);
  padding: 10px 16px;
  margin-right: 4px;
}

.nav-tabs .nav-link:hover {
  background-color: var(--neutral-light);
  color: var(--text-primary);
}

.nav-tabs .nav-link.active {
  background-color: var(--neutral-light);
  color: var(--primary-color);
  font-weight: 600;
}

/* Rounded alerts */
.alert {
  border-radius: 12px !important;
  border: none;
}

/* Netflix profile buttons styling */
.profile-btn {
  border-radius: 20px !important;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Facebook-style gradient borders */
.card.premium {
  position: relative;
  border: none !important;
}

.card.premium::before {
  content: '';
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -2px;
  right: -2px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  z-index: -1;
  border-radius: 17px;
}

/* Compact pricing display */
.option-price {
    display: inline-block;
    margin-left: 5px;
    font-size: 1em;
    font-weight: bold;
}

.option-discount {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 5px;
    background-color: rgba(40, 167, 69, 0.15);
    border-radius: 3px;
    color: #28a745;
    font-size: 0.8em;
    font-weight: bold;
}

.price-btn {
    padding: 8px 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

