/* ===== Vibe Coding 捕夢網 v2.0 - 科技藍紫色風格 ===== */
/* 作者：阿亮老師（3A科技研究室） */

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

:root {
    /* 主要顏色 - 現代科技風格 */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #0ea5e9;
    --tech-blue: #06b6d4;
    --tech-purple: #a855f7;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* 漸層定義 - 更柔和的色彩 */
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-tech: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-cyber: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #8b5cf6 100%);

    /* 背景色 - 更深邃舒適 */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;

    /* 文字顏色 - 更高對比度 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --shadow-neon: 0 0 25px rgba(99, 102, 241, 0.4);
}

body {
    font-family: 'Microsoft JhengHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-cyber);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
}

/* ===== 背景裝飾 - 現代科技感 ===== */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== 科技網格背景 ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* ===== 主容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ===== 標題區 - 科技藍紫色 ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 48px;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6));
}

.header h1 {
    font-size: 2.5rem;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(6, 182, 212, 0.3);
    filter: brightness(1.3) contrast(1.2);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.author-info {
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    display: inline-block;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.author-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.usage-terms {
    font-size: 0.85rem !important;
    color: var(--tech-blue) !important;
    font-weight: 500;
}

/* ===== 管理按鈕 ===== */
.admin-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-tech);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-neon);
    transition: var(--transition);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

.admin-icon {
    font-size: 1.2rem;
}

.admin-text {
    font-size: 0.95rem;
}

/* ===== 表單容器 - 現代風格 ===== */
.form-container {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: var(--gradient-tech);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: var(--shadow-neon);
}

/* ===== 專案類型卡片 - 科技感 ===== */
.project-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.project-type-card {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.project-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: rgba(51, 65, 85, 0.6);
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-height: 120px;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.card-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.project-type-card:hover .card-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-neon);
    border-color: var(--tech-blue);
    background: rgba(99, 102, 241, 0.15);
}

.project-type-card input[type="radio"]:checked + .card-content {
    background: var(--gradient-tech);
    border-color: var(--tech-blue);
    transform: scale(1.05);
    box-shadow: var(--shadow-neon);
}

.project-type-card input[type="radio"]:checked + .card-content .card-label {
    color: white;
}

.project-type-card input[type="radio"]:checked + .card-content .card-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

/* ===== 技術選擇 ===== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tech-category h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tech-blue);
}

.tech-checkbox {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.tech-checkbox:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(5px);
    border-color: var(--tech-blue);
}

.tech-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--tech-blue);
}

.tech-checkbox span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.tech-checkbox input[type="checkbox"]:checked + span {
    color: var(--tech-blue);
    font-weight: 600;
}

/* ===== 輸入欄位 ===== */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: rgba(51, 65, 85, 0.4);
    color: var(--text-primary);
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(51, 65, 85, 0.7);
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== 提交按鈕 - 科技感 ===== */
.submit-section {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-tech);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-neon);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

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

.btn-icon {
    font-size: 1.3rem;
}

/* ===== 結果顯示區 ===== */
.result-section {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
}

.result-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.copy-btn {
    padding: 10px 20px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.result-content {
    background: rgba(51, 65, 85, 0.5);
    padding: 30px;
    border-radius: var(--border-radius);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.action-btn {
    padding: 12px 25px;
    background: var(--gradient-tech);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

/* ===== 載入動畫 ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--tech-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-neon);
}

.loading-content p {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 10px 0;
}

.loading-tips {
    color: var(--text-muted);
    font-size: 0.9rem !important;
}

/* ===== 頁尾 ===== */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-secondary);
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* ===== 動畫效果 ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .form-container {
        padding: 25px;
    }

    .project-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .result-header {
        flex-direction: column;
        gap: 15px;
    }

    .result-actions {
        flex-direction: column;
    }

    .admin-link {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .project-type-grid {
        grid-template-columns: 1fr;
    }

    .card-content {
        padding: 20px;
    }
}
