/* ==========================================================================
   ChatGPT Transfer Tool - Main Styles
   Modern light theme with subtle glassmorphism effects
   ========================================================================== */

/* CSS Variables */
:root {
    --color-bg: #f8fafc;
    --color-bg-card: rgba(255, 255, 255, 0.9);
    --color-bg-card-hover: rgba(255, 255, 255, 0.95);
    --color-border: rgba(99, 102, 241, 0.15);
    --color-border-focus: rgba(99, 102, 241, 0.5);

    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-primary-glow: rgba(99, 102, 241, 0.2);

    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    --color-text: #1e293b;
    --color-text-muted: #475569;
    --color-text-dim: #64748b;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-bg: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f8fafc 100%);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --shadow-card: 0 4px 24px rgba(99, 102, 241, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-button: 0 4px 16px rgba(99, 102, 241, 0.35);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-bg);
    z-index: -2;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
    top: -200px;
    right: -100px;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #c7d2fe 0%, #e0e7ff 100%);
    bottom: -100px;
    left: -100px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-30px, 30px);
    }

    50% {
        transform: translate(20px, -20px);
    }

    75% {
        transform: translate(30px, 20px);
    }
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 1.5rem;
    -webkit-text-fill-color: initial;
}

.title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: var(--transition-normal);
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.8;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.step.active .step-number {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: var(--shadow-button);
}

.step.completed .step-number {
    background: var(--color-success);
    border-color: transparent;
}

.step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.step.active .step-label {
    color: var(--color-text);
}

.step-line {
    flex: 0 0 40px;
    height: 2px;
    background: var(--color-border);
    margin: 0 8px;
    margin-bottom: 24px;
}

/* Main Content */
.main-content {
    position: relative;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.card-icon {
    font-size: 1.5rem;
}

.card h2 {
    font-size: 1.35rem;
    font-weight: 600;
}

.card-desc {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 24px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

input[type="email"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: var(--transition-fast);
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-dim);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 48px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-button);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn .btn-loading {
    display: none;
}

.btn.loading .btn-loading {
    display: inline;
}

/* Messages */
.message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: none;
}

.message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--color-success);
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}

/* Info Box */
.info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.info-title {
    font-weight: 600;
    margin-bottom: 12px;
}

.info-list {
    margin-left: 20px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.info-list li {
    margin-bottom: 8px;
}

.info-list a {
    color: var(--color-primary-hover);
    text-decoration: none;
}

.info-list a:hover {
    text-decoration: underline;
}

.session-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-sm);
    color: var(--color-primary-hover);
    text-decoration: none;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.session-link:hover {
    background: rgba(99, 102, 241, 0.15);
}

.link-icon {
    opacity: 0.6;
}

/* Notice Box */
.notice-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.notice-box.notice-warning {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.notice-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.notice-list {
    margin-left: 20px;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.notice-list li {
    margin-bottom: 4px;
}

/* Workspace Selector */
.workspace-selector {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.workspace-selector .form-group {
    flex: 1;
    margin-bottom: 0;
}

.arrow-icon {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    padding-bottom: 10px;
}

/* Workspace Selector Vertical */
.workspace-selector-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.workspace-selector-vertical .form-group {
    margin-bottom: 0;
}

/* Numbered Notice List */
.notice-list-numbered {
    margin-left: 24px;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding-left: 0;
}

.notice-list-numbered li {
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Progress */
.progress-container {
    margin: 32px 0;
}

.progress-bar {
    height: 10px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* Migration Stats */
.migration-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 24px;
}

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

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Log Container */
.log-container {
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.log-header {
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.08);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.log-content {
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.log-entry {
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 2px solid var(--color-border);
}

.log-entry.success {
    border-color: var(--color-success);
    color: var(--color-success);
}

.log-entry.error {
    border-color: var(--color-error);
    color: var(--color-error);
}

/* Completion */
.completion-actions {
    text-align: center;
    margin-top: 32px;
}

.success-message {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-success);
}

/* Failure Actions */
.failure-actions {
    text-align: center;
    margin-top: 32px;
}

.error-message {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--color-error);
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-dim);
    font-size: 0.875rem;
    background: var(--color-bg);
    margin-top: auto;
}

.footer-note {
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 24px 16px;
    }

    .title {
        font-size: 1.75rem;
    }

    .card {
        padding: 28px 20px;
    }

    .steps-indicator {
        padding: 0;
    }

    .step-label {
        display: none;
    }

    .step-line {
        margin-bottom: 0;
        flex: 0 0 24px;
    }

    .workspace-selector {
        flex-direction: column;
    }

    .arrow-icon {
        transform: rotate(90deg);
        padding: 0;
    }

    .migration-stats {
        gap: 24px;
    }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.divider span {
    padding: 0 16px;
    color: var(--color-text-dim);
    font-size: 14px;
    font-weight: 500;
}