/* ai_tts_app/static/styles.css */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #edf2fe;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4bb543;
    --error-color: #ff3333;
    --warning-color: #ffcc00;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --dark-gray: #343a40;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --glass-effect: rgba(255, 255, 255, 0.15);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(45deg, #4361ee 0%, #3f37c9 100%);
    --footer-gradient: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7ff;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
}

.loading-content p {
    opacity: 0.8;
    opacity: 0;
    transform: translateY(10px);
}

.loading-content h2.animate__fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.loading-content p.animate__fadeIn {
    animation: fadeIn 0.5s ease 0.3s forwards;
}

.progress-container {
    width: 100%;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 1.5s ease;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main App Container */
.app-container {
    display: none;
    min-height: 100vh;
    position: relative;
}

/* Gradient Background Elements */
.gradient-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    z-index: -1;
}

.circle-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    top: -200px;
    left: -200px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    bottom: -100px;
    right: -100px;
}

/* Glass Effect */
.glass-effect {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.8);
    border: var(--glass-border);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2.5rem; /* Bigger size */
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.pulse-animate {
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.3); opacity: 0.75; }
    100% { transform: scale(1); opacity: 1; }
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}


/* Profile Page Styles */
.user-profile {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  padding: 0.5rem 0;
  z-index: 1000;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--dark-color);
  text-decoration: none;
  transition: background-color 0.2s;
}

.profile-dropdown a:hover {
  background-color: var(--primary-light);
}

.dropdown-divider {
  height: 1px;
  background-color: rgba(0,0,0,0.1);
  margin: 0.5rem 0;
}


.profile-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

@media (min-width: 992px) {
  .profile-container {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-item i {
  color: var(--primary-color);
}

.profile-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.profile-section h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

.profile-section h3 i {
  color: var(--primary-color);
}

.profile-form .form-group {
  margin-bottom: 1.5rem;
}

.profile-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-color);
}

.profile-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.profile-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.profile-form input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Security Section */
.security-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(67, 97, 238, 0.05);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.security-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.security-info i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.security-info h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.security-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-color);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(75, 181, 67, 0.1);
  color: #4bb543;
}

.status-badge.inactive {
  background: rgba(255, 51, 51, 0.1);
  color: var(--error-color);
}

/* Subscription Section */
.subscription-status {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(67, 97, 238, 0.05);
  border-radius: 8px;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .subscription-status {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.plan-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

.plan-badge.free {
  background: rgba(108, 117, 125, 0.1);
  color: var(--gray-color);
}

.plan-badge.pro {
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
}

.plan-badge.enterprise {
  background: rgba(72, 149, 239, 0.1);
  color: var(--accent-color);
}

.plan-details p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.plan-details strong {
  color: var(--dark-color);
}

/* Usage Statistics */
.usage-stats {
  margin-bottom: 1.5rem;
}

.stat-item {
  margin-bottom: 1.5rem;
}

.stat-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stat-info h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.stat-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-color);
}

.stat-progress progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
}

.stat-progress progress::-webkit-progress-bar {
  background: #f0f0f0;
  border-radius: 4px;
}

.stat-progress progress::-webkit-progress-value {
  background: var(--primary-color);
  border-radius: 4px;
}

.usage-reset {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-color);
  padding: 1rem;
  background: rgba(67, 97, 238, 0.05);
  border-radius: 8px;
}

/* Billing History */
.billing-history {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(67, 97, 238, 0.03);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.no-history {
  color: var(--gray-color);
  text-align: center;
  font-style: italic;
}

/* Danger Zone */
.danger-zone {
  border: 1px solid rgba(255, 51, 51, 0.2);
  background: rgba(255, 51, 51, 0.05);
}

.danger-zone h3 {
  color: var(--error-color);
}

.danger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.danger-item h4 {
  margin: 0 0 0.25rem;
  color: var(--dark-color);
}

.danger-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-color);
}

.btn-danger {
  background: rgba(255, 51, 51, 0.1);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}

.btn-danger:hover {
  background: var(--error-color);
  color: white;
}

/* Password Strength Meter */
.password-strength {
  margin-top: 0.5rem;
}

.strength-meter {
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  margin-bottom: 0.25rem;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0%;
  background: var(--error-color);
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
  font-size: 0.75rem;
  color: var(--gray-color);
}

.strength-text span {
  font-weight: 500;
}

/* Warning Message */
.warning-message {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 51, 51, 0.1);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: var(--error-color);
}

.warning-message i {
  font-size: 1.5rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.checkbox-group input {
  width: auto;
}

.checkbox-group label {
  margin: 0;
  font-size: 0.9rem;
}

.loading {
    position: relative;
    color: transparent !important;
    min-width: 80px;
    overflow: hidden;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.profile-avatar.loading {
    background: #f0f0f0;
    border-color: #f0f0f0;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 1rem auto;
    padding: 0 2rem;
}

.tts-container {
    display: grid;
    grid-template-columns: 350px 1fr; /* Voice Settings left, Text Input right */
    gap: 1.5rem;
	align-items: flex-start;
    margin-bottom: 2rem;
}

/* Controls */
.tts-controls {
    padding: 1.5rem;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.select-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.select-wrapper.with-search {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1rem center;
    background-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Loading state for selects */
.select-loading {
    position: relative;
    color: var(--gray-color);
}

.select-loading::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.form-range {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* Text Area */
.tts-textarea-container {
    display: flex;
    flex-direction: column;
}

.textarea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.char-count {
    font-size: 0.875rem;
    color: var(--gray-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.form-textarea {
    resize: vertical;
    min-height: 200px;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    transition: var(--transition);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Output Section */
.output-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: var(--border-radius);
}

/* Output Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Output Buttons */
.section-actions button {
    margin-left: 0.5rem;
}

/* Output Container */
.output-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Visualizer Bars */
.visualizer-bars {
    display: flex;
    align-items: flex-end;
    height: 80px;
    gap: 0.5rem;
    width: 90%;
}

.visualizer-bar {
    flex: 1;
    background: var(--gradient-primary);
    border-radius: 4px;
    min-height: 10px;
    transition: height 0.2s ease;
}

@keyframes pulse {
    0%   { transform: scale(1); opacity: 1; }
    50%  { transform: scale(1.3); opacity: 0.75; }
    100% { transform: scale(1); opacity: 1; }
}

/* Audio Player */
.audio-player-container {
    display: flex;
    justify-content: center;
}

/* Output Details Cards */
.output-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.detail-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f3f3f3;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.detail-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
}

.detail-value {
    font-size: 1rem;
    font-weight: bold;
    color: #000;
}

.section-header.center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-top: 0.5rem;
    max-width: 700px;
}

/* ✅ Base button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;   /* Keep consistent here */
  border-radius: 30px;       /* Clean pill shape for all */
  border: none;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  z-index: 10;
  position: relative;
}

/* ✅ Primary button */
.btn-primary {
  background: #4361ee;
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(67, 97, 238, 0.3);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.4);
}

/* ✅ Outline button */
.btn-outline {
  background: transparent;
  color: #4361ee;
  border: 2px solid #4361ee;
}

.btn-outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(67, 97, 238, 0.15);
  background: rgba(67, 97, 238, 0.05);
}

.btn-outline:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 350px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast-close {
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--dark-color);
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-color);
}



/* Responsive Styles */
@media (max-width: 992px) {
    .tts-container {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .textarea-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
}

/* Button Styles */
.btn-login {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    margin-right: 0.5rem;
}

.btn-glow {
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.4);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-text:hover {
    color: var(--primary-color);
}

/* Button States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* Voice Preview Container */
.voice-preview-container {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.voice-gender-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}

.voice-gender-male {
    background-color: #4361ee;
}

.voice-gender-female {
    background-color: #f72585;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.hero-cta {
    margin-top: 1.5rem;
}

.voice-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 80px;
}

.wave-bar {
    width: 8px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 4px;
    animation: wave 1.5s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0.1s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.5s; }

@keyframes wave {
    0%, 100% { height: 20px; }
    50% { height: 60px; }
}

/* Features Section */
.features-section {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.features-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.features-section p {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    padding: 1.5rem;
    transition: transform 0.3s ease;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin: 0 auto 1rem;
}

/* Footer */
.app-footer {
    background: var(--footer-gradient);
    padding: 2rem 2rem 1.5rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.footer-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-tagline {
    color: var(--gray-color);
    font-size: 0.9rem;
    max-width: 250px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.footer-social a {
    color: var(--dark-gray);
    font-size: 1.25rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social a:hover {
    color: white;
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links-container {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    flex: 1;
}

.footer-links {
    min-width: 150px;
}

.footer-links.products {
    order: 1;
}

.footer-links.company {
    order: 2;
}

.footer-links h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 0.25rem;
}

.footer-bottom {
  width: 100%;
  max-width: 1400px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-color);
  font-size: 0.85rem;
}


.footer-legal {
    display: flex;
    gap: 1rem;
}

.footer-legal a {
    color: var(--gray-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--primary-color);
}

.footer-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(67, 97, 238, 0.1) 0%, transparent 50%);
    z-index: 0;
}

/* Auth Modals */
.auth-modal .modal-content {
    max-width: 450px;
    padding: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-with-icon input {
    padding-left: 3rem !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: var(--gray-color);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #eee;
}

.auth-divider span {
    padding: 0 1rem;
}

.social-auth {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-google, .btn-github {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-google {
    background-color: #4285F4;
    color: white;
}

.btn-github {
    background-color: #333;
    color: white;
}

.auth-footer {
    text-align: center;
    color: var(--gray-color);
}

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

.auth-dependent.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}
.auth-dependent.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Floating Help */
.floating-help {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    z-index: 100;
    transition: var(--transition);
}

.floating-help:hover {
    transform: scale(1.1);
}

#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999; /* Always above header/profile */
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 12px;
  cursor: pointer;
  display: none; /* Hidden by default */
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#scrollToTopBtn:hover {
  background: var(--primary-dark);
}


/* Help Modal */
.help-modal .modal-content {
    max-width: 800px;
    padding: 1.5rem;
}

.help-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.help-section {
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    background-color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.help-section:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
}

.help-section h3 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section p {
    color: var(--gray-color);
    font-size: 0.85rem;
}

/* Custom Select Dropdown Styles */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    margin-top: 0.25rem;
}

.custom-select.open .custom-select-dropdown {
    display: block;
}

.search-container {
    position: sticky;
    top: 0;
    background: white;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    z-index: 10;
}

.search-container .search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.85rem;
}

.search-container .fa-search {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 0.85rem;
}

.options-container {
    padding: 0.5rem 0;
}

.option-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-item:hover {
    background: var(--primary-light);
}

.option-item.selected {
    background: var(--primary-color);
    color: white;
}

.option-item.disabled {
    color: var(--gray-color);
    cursor: not-allowed;
}

/* Loading State */
.options-loading {
    padding: 1rem;
    text-align: center;
    color: var(--gray-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.options-loading .spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(67, 97, 238, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* -------------------------- */
/* 🎯 Analytics Modal Styling */
/* -------------------------- */
.analytics-grid {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.analytics-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    flex: 1 1 240px;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.analytics-progress {
    background: #e9ecef;
    border-radius: 6px;
    height: 8px;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.analytics-progress #charsProgress {
    height: 100%;
    background: var(--primary-color);
    width: 50%;
    transition: width 0.4s ease;
}

.analytics-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* -------------------------- */
/* 💰 Pricing Modal Styling   */
/* -------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pricing-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.pricing-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.price {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    color: var(--secondary-color);
}

.price span {
    font-size: 1rem;
    color: var(--gray-color);
}

.features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.features li {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.pricing-card:nth-child(2) {
    border: 2px solid var(--primary-color);
    background-color: var(--primary-light);
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.25);
}

/* Modal width globally */
.modal-content.glass-effect {
    max-width: 900px;
    width: 95%;
}

/* Responsive grid */
@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .modal-content.glass-effect {
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.5rem;
    }
}


