/* Font smoothing for body */
body {
    background: linear-gradient(135deg, #f4f8fb 0%, #f8fafc 100%);
}

/* Spinner animation */
.fa-circle-notch {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Font Awesome Brand icons */
.fa-brands {
    font-family: "Font Awesome 6 Brands";
    display: inline-block;
    line-height: 1;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.fa-brands.fa-google::before {
    content: "\f1a0";
    color: #4285F4;
}
.fa-brands.fa-microsoft::before {
    content: "\f3ca";
    color: #0078D4;
}
.fa-brands.fa-facebook::before {
    content: "\f39e";
    color: #1877F2;
}


/* 移除 Google Sign-In 按鈕的外圍正方形邊框 */
#google-login-btn > div {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 統一第三方登錄按鈕樣式 */
#google-login-btn,
#microsoft-login-btn,
#facebook-login-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
#google-login-btn:hover,
#microsoft-login-btn:hover,
#facebook-login-btn:hover {
    background-color: #f3f4f6; /* Tailwind bg-gray-50 */
}

/* 密碼輸入框的眼睛圖標 */
.toggle-password-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 12px;
    cursor: pointer;
    color: #6b7280; /* Tailwind text-gray-500 */
}
.toggle-password-btn:hover {
    color: #374151; /* Tailwind text-gray-700 */
}

/* Range input thumb styles */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 5px;
    outline: none;
    transition: background 0.2s ease;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}
input[type="range"]::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}



/* FadeIn Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom Toggle Switch */
.toggle-switch {
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.3s ease;
    display: block;
}
.toggle-switch:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}
input[type="checkbox"]:checked + .toggle-switch {
    background-color: #3b82f6;
}
input[type="checkbox"]:checked + .toggle-switch:before {
    transform: translateX(20px);
}
input[type="checkbox"]:disabled + .toggle-switch {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Step Indicator Styles */
.step-indicator {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
.step-indicator .step-circle {
    background-color: #d1d5db; /* Tailwind gray-300 */
    transition: background-color 0.3s ease;
}
.step-indicator .step-text {
    color: #d1d5db; /* Tailwind gray-300 */
    transition: color 0.3s ease;
}
.step-indicator.step-active .step-circle {
    background-color: #3b82f6; /* Tailwind blue-500 */
}
.step-indicator.step-active .step-text {
    color: #3b82f6; /* Tailwind blue-500 */
}

/* Drop Zone Dragover Animation */
#drop-zone {
    transition: all 0.3s ease;
}
#drop-zone.dragover {
    background-color: #e6f3ff; /* Light blue background */
    border-color: #3b82f6; /* Tailwind blue-500 */
    transform: scale(1.02); /* Slight scale-up effect */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); /* Glow effect */
}

/* Card Styles */
.card {
    max-width: 100%;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .card {
        max-width: 800px;
    }
}

#activity-table-body td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb; /* Tailwind gray-200 */
}

@media (max-width: 768px) {
    #activity-table-body {
        font-size: 0.875rem; /* 適配小屏幕 */
    }
    #activity-table-body td {
        padding: 0.5rem;
    }
}

/* Transactions Table Scrollable Styles */
#subscription-details-modal .table-container {
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

#subscription-details-modal table {
    width: max-content; /* Allows table to expand based on content */
    min-width: 100%; /* Ensures table takes full container width if smaller */
    border-collapse: collapse;
}

#subscription-details-modal th,
#subscription-details-modal td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb; /* Tailwind gray-200 */
    white-space: nowrap; /* Prevents text wrapping for compact columns */
}

#subscription-details-modal th {
    font-weight: 600;
    color: #374151; /* Tailwind gray-700 */
}

#subscription-details-modal td {
    color: #4b5563; /* Tailwind gray-600 */
}

@media (max-width: 768px) {
    #subscription-details-modal th,
    #subscription-details-modal td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

.border-red-500 { border-color: #f87171 !important; }
.text-red-600 { color: #dc2626 !important; }

/* Responsive for Watermark Step 2 */
@media (min-width: 1024px) {
  #watermark-form {
    height: 60vh !important;
  }
  #watermark-tabs {
    max-height: 60vh !important;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  #watermark-form {
    height: 70vh !important;
  }
  #watermark-tabs {
    max-height: 70vh !important;
  }
}

@media (max-width: 767px) {
  #watermark-form {
    flex-direction: column !important;
    height: auto !important;
  }
  #watermark-tabs {
    max-height: 50vh !important;
    margin-bottom: 1rem;
  }
  #preview {
    max-height: 30vh !important;
  }
}

/* === AI Style Decoration === */
.ai-banner {
    background: linear-gradient(135deg, #4f8bff 0%, #bb7efc 60%, #f472b6 100%);
    position: relative;
    overflow: hidden;
}
.ai-blob-left {
    position: absolute;
    top: -3rem;
    left: -4rem;
    width: 20rem;
    height: 20rem;
    background: radial-gradient(ellipse at 60% 40%, #a5b4fc80 0%, #818cf880 30%, #f472b680 100%);
    filter: blur(48px);
    opacity: 0.5;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    animation: float 5s ease-in-out infinite alternate;
}
.ai-blob-right {
    position: absolute;
    bottom: -2rem;
    right: -4rem;
    width: 20rem;
    height: 20rem;
    background: radial-gradient(ellipse at 60% 40%, #f472b680 0%, #818cf880 30%, #a5b4fc80 100%);
    filter: blur(48px);
    opacity: 0.5;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}
.ai-illust {
    position: absolute;
    right: 2rem;
    bottom: 0;
    width: 13rem;
    opacity: 0.8;
    z-index: 10;
    pointer-events: none;
    user-select: none;
}
@keyframes float {
    from { transform: translateY(0);}
    to { transform: translateY(-32px);}
}
.ai-shine {
    background: linear-gradient(90deg, #a5b4fc 0%, #c4b5fd 40%, #f472b6 100%);
    background-size: 200% 200%;
    animation: shine 2.5s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
@keyframes shine {
    0% {background-position: 0 50%;}
    100% {background-position: 100% 50%;}
}
.ai-card {
    position: relative;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    box-shadow: 0 8px 40px 0 rgba(87,78,255,0.10), 0 2px 8px 0 rgba(64,92,255,0.10);
    border: 1px solid rgba(147, 51, 234, 0.08);
    overflow: hidden;
    padding: 2rem;
}
.ai-card-blob {
    position: absolute;
    right: -2rem;
    top: -2rem;
    width: 11rem;
    height: 11rem;
    background: linear-gradient(135deg, #a5b4fc80 0%, #818cf880 70%, #f472b680 100%);
    filter: blur(40px);
    opacity: 0.35;
    border-radius: 50%;
    z-index: 1;
}
.ai-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 1.75rem;
    box-shadow: 0 2px 16px 0 rgba(87,78,255,0.08);
    color: #3b82f6;
    background: #e0e7ff;
    margin-bottom: 0.5rem;
}
.ai-faq-card {
    background: rgba(255,255,255,0.85);
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(147,51,234,0.05);
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ai-faq-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 28px 0 rgba(87,78,255,0.10);
}
.ai-faq-badge {
    background: linear-gradient(135deg, #a5b4fc 0%, #f472b6 100%);
    color: white;
    font-size: 1.5rem;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    display: flex;
    border-radius: 9999px;
    box-shadow: 0 1px 8px 0 rgba(147,51,234,0.10);
}
.ai-video-card {
    position: relative;
    width: 100%;
}
.ai-video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 16px 0 rgba(87,78,255,0.11);
    margin-bottom: 0.5rem;
}
.ai-video-badge {
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: linear-gradient(135deg, #a5b4fc 0%, #f472b6 100%);
    color: white;
    padding: 0.45rem 0.7rem;
    font-size: 1.1rem;
    border-radius: 9999px;
    box-shadow: 0 1px 8px 0 rgba(147,51,234,0.13);
    z-index: 10;
}
.ai-cta {
    background: linear-gradient(90deg, #3b82f6 0%, #a21caf 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 40px 0 rgba(87,78,255,0.10);
    border: 1px solid rgba(255,255,255,0.10);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
}
@media (min-width: 768px) {
    .ai-cta {
        flex-direction: row;
        align-items: center;
    }
}
.ai-cta-btn {
    display: inline-block;
    background: white;
    color: #a21caf;
    font-weight: bold;
    padding: 0.8rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 16px 0 rgba(147,51,234,0.09);
    transition: background 0.15s, color 0.15s, transform 0.12s;
    font-size: 1.15rem;
}
.ai-cta-btn:hover {
    background: #f3e8ff;
    color: #3b82f6;
    transform: scale(1.07);
}
.animate-spin-slow { animation: spin 2.5s linear infinite; }
@keyframes spin { 0% {transform:rotate(0deg);} 100% {transform:rotate(360deg);} }
.animate-fadein { animation: fadeIn 1s ease; }
.animate-fadein-slow { animation: fadeIn 2.5s ease; }
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
