/* ==========================================================================
   Google Indexing Bridge - Design System & Modern UI Stylesheet
   ========================================================================== */

:root {
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Color Palette */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --border-color: #334155;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ==========================================================================
   Layout Structure
   ========================================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.brand-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.brand-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.brand-text span {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    width: 100%;
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--text-main);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 16px;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}

.footer-link:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 32px;
    max-width: 1300px;
}

/* Header Bar */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

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

.header-bar p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==========================================================================
   Components & Tabs
   ========================================================================== */

.tab-page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-page.active {
    display: block;
}

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

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    font-size: 20px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
}

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

.stat-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Content Card */
.content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.content-card.max-w-700 { max-width: 700px; }
.content-card.max-w-800 { max-width: 800px; }
.margin-top-20 { margin-top: 20px; }

.content-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* Action Buttons Row */
.action-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.req { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-control-sm {
    padding: 6px 12px;
    font-size: 13px;
    width: 200px;
}

.code-input {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.form-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-accent {
    background-color: var(--accent);
    color: #fff;
}
.btn-accent:hover { background-color: var(--accent-hover); }

.btn-secondary {
    background-color: #334155;
    color: var(--text-main);
}
.btn-secondary:hover { background-color: #475569; }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover { background-color: rgba(255, 255, 255, 0.05); }

.btn-block {
    width: 100%;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;

}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-danger:hover { background-color: var(--danger); color: #fff; }

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    background-color: #0f172a;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.data-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.text-center { text-align: center; }

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-submitted { background-color: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-pending { background-color: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-failed { background-color: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Status Box */
.status-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.status-icon {
    font-size: 28px;
}

.status-info strong {
    font-size: 15px;
}

.status-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Guide Steps */
.guide-steps {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text-main);
}

.guide-steps li {
    font-size: 14px;
    line-height: 1.6;
}

.guide-steps code {
    background-color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    font-size: 14px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

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

/* ==========================================================================
   Bridge Page Styles
   ========================================================================== */

.bridge-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
}

.bridge-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 640px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.bridge-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

.bridge-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.bridge-summary {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.bridge-thumbnail-wrap {
    margin-bottom: 28px;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 280px;
}

.bridge-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bridge-actions {
    margin-bottom: 20px;
}

.bridge-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bridge-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.bridge-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.bridge-redirect-notice {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}
