/* ============================================
   Creator Tools - Shared Styles
   mamuangsook.com
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #007AFF;
    --primary-hover: #0056CC;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --bg-tertiary: #EFEFF4;

    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #86868B;

    --border-color: #D2D2D7;
    --border-light: #E5E5EA;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Site Header
   ============================================ */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-brand {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background: var(--bg-primary);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   Ad Banners
   ============================================ */
.ad {
    margin: 30px auto;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--border-light));
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 80px;
    min-width: 728px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-middle .ad-placeholder,
.ad-bottom .ad-placeholder {
    min-width: 300px;
    min-height: 250px;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding: 40px 0;
}

/* Tool Card */
.tool-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    max-width: 600px;
    margin: 0 auto;
}

.tool-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Tool Input */
.tool-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.tool-input input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.tool-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.tool-input input::placeholder {
    color: var(--text-tertiary);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-light);
}

/* Loading State */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px;
    color: var(--text-secondary);
}

.loading.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Thumbnail Grid
   ============================================ */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.thumbnail-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.thumbnail-item:hover {
    box-shadow: var(--shadow-md);
}

.thumbnail-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.thumbnail-info {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thumbnail-quality {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.thumbnail-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.btn-icon-primary {
    background: var(--primary-color);
    color: white;
}

.btn-icon-primary:hover {
    background: var(--primary-hover);
}

.btn-icon-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon-secondary:hover {
    background: var(--border-light);
}

/* ============================================
   Title List
   ============================================ */
.title-list {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.title-list.active {
    display: flex;
}

.title-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.title-item:hover {
    background: var(--bg-tertiary);
}

.title-number {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.title-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.title-copy {
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.title-item:hover .title-copy {
    opacity: 1;
}

/* ============================================
   Tag Container
   ============================================ */
.tag-container {
    display: none;
    margin-top: 20px;
}

.tag-container.active {
    display: block;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.tag-item {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.tag-remove {
    cursor: pointer;
    opacity: 0.7;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ============================================
   SEO Content Section
   ============================================ */
.seo-section {
    padding: 60px 0;
    background: var(--bg-primary);
    margin-top: 40px;
}

.content-article {
    max-width: 800px;
    margin: 0 auto 50px;
}

.content-article:last-child {
    margin-bottom: 0;
}

.content-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.content-article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.content-article p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-article ul,
.content-article ol {
    margin: 20px 0;
    padding-left: 20px;
}

.content-article li {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 10px 0;
}

/* Step List */
.step-list {
    list-style: none;
    padding: 0;
}

.step-list li {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    margin: 25px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.data-table td {
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: var(--bg-tertiary);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer-section h4 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: var(--text-tertiary);
    line-height: 1.7;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: var(--text-tertiary);
    text-decoration: none;
}

.footer-section ul a:hover {
    color: white;
}

.footer-disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    margin-bottom: 30px;
}

.footer-disclaimer p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-description {
        font-size: 1rem;
    }

    .tool-card {
        padding: 24px;
    }

    .thumbnail-grid {
        grid-template-columns: 1fr;
    }

    .ad-placeholder {
        min-width: 100%;
        padding: 20px;
    }

    .content-article h2 {
        font-size: 1.5rem;
    }

    .step-list li {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

a {
  text-decoration: none;
  color: var(--dark-color);
  transition: var(--transition);
}
.btn-support {
  background: var(--accent-color);
  
  box-shadow: 0 4px 15px rgba(80, 200, 120, 0.3);
}

.btn-support:hover {
  background: #3da862;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(80, 200, 120, 0.4);
}

/* Support Section */
.support-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #fff5f0 0%, #f0f8ff 100%);
  text-align: center;
}

.support-content {
  max-width: 600px;
  margin: 0 auto;
}

.support-content h2 {
  margin-bottom: 1rem;
}

.support-content p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}
