/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* 容器样式 */
.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

header p.tech-support {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: bold;
    margin-top: 15px;
}

/* 导航样式 */
nav {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: #667eea;
    background-color: #f0f0f0;
}

/* 主内容样式 */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2rem;
    text-align: center;
}

/* 表单样式 */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.form-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 平台选择样式 */
.platform-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.platform-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.platform-options input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 进度条样式 */
.progress-container {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #667eea;
    font-size: 1.2rem;
}

.status-message {
    text-align: center;
    color: #555;
    margin-top: 10px;
    font-style: italic;
}

/* 下载区域样式 */
.download-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.download-item {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    min-width: 300px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.download-item h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.download-item p {
    margin-bottom: 20px;
    color: #666;
}

/* 功能特性样式 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-item h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
}

/* 页脚样式 */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        padding: 12px;
    }

    section {
        padding: 20px;
    }

    .form-section {
        padding: 15px;
    }

    .platform-options {
        flex-direction: column;
        gap: 10px;
    }

    .download-container {
        flex-direction: column;
        align-items: center;
    }

    .download-item {
        min-width: auto;
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-right: 0;
    }
}

/* 源码编辑区域样式 */
.source-editor-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.source-import-section,
.source-files-section,
.code-editor-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.help-text {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 文件树样式 */
.file-tree {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
}

.file-tree ul {
    list-style: none;
    padding-left: 20px;
}

.file-tree li {
    margin: 5px 0;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.file-tree li:hover {
    background-color: #f0f0f0;
}

.file-tree .folder {
    font-weight: 600;
    color: #667eea;
}

.file-tree .file {
    color: #555;
}

/* 代码编辑器样式 */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

#currentFileName {
    font-weight: 600;
    color: #333;
    font-family: monospace;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.editor-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#codeEditor {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    background: #fafafa;
}

#codeEditor:focus {
    background: white;
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 源码文件列表和编辑器的布局 */
.source-files-section {
    margin-top: 20px;
}

.code-editor-section {
    margin-top: 20px;
}

/* 响应式设计 - 源码编辑区域 */
@media (min-width: 768px) {
    .source-editor-section {
        display: grid;
        grid-template-columns: 300px 1fr;
        grid-template-rows: auto 1fr;
        gap: 20px;
    }
    
    .source-import-section {
        grid-column: 1 / -1;
    }
    
    .source-files-section {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0;
    }
    
    .code-editor-section {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }
    
    .file-tree {
        max-height: none;
        height: calc(100% - 40px);
    }
    
    #codeEditor {
        min-height: calc(100vh - 400px);
    }
}

@media (max-width: 767px) {
    .editor-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .editor-actions {
        justify-content: center;
    }
    
    #codeEditor {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 40px 0;
    }

    header h1 {
        font-size: 1.8rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .form-section h3 {
        font-size: 1.1rem;
    }
}

/* 可视化编辑器样式 */
.edit-mode-switch {
    display: flex;
    gap: 15px;
    margin-right: 15px;
}

.edit-mode-switch label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
    color: #555;
}

/* 可视化编辑器布局 */
.visual-editor-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 20px;
    height: 500px;
}

/* 可视化预览区域 */
.visual-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.preview-header h4 {
    margin: 0;
    color: #667eea;
    font-size: 14px;
}

.preview-controls {
    display: flex;
    gap: 5px;
}

.preview-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #fafafa;
    position: relative;
}

/* 属性面板 */
.property-panel {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.property-panel h4 {
    margin: 0;
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    color: #667eea;
    font-size: 14px;
}

.property-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 14px;
    color: #555;
}

.property-item {
    margin-bottom: 15px;
}

.property-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 12px;
    color: #666;
}

.property-item input,
.property-item select,
.property-item textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
}

/* UI组件库 */
.component-library {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.component-library h4 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 14px;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.component-item {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.component-item:hover {
    background: #e8e8e8;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.component-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.component-name {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

/* 预览内容样式 */
#previewContent {
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    min-height: 400px;
    position: relative;
}

/* 模拟Android屏幕 */
.android-screen {
    width: 320px;
    height: 568px;
    background: white;
    border: 10px solid #333;
    border-radius: 20px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* 响应式设计 - 可视化编辑器 */
@media (max-width: 1024px) {
    .visual-editor-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .property-panel {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .visual-editor-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .component-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .component-item {
        padding: 10px;
    }
    
    .component-icon {
        font-size: 20px;
    }
    
    .component-name {
        font-size: 11px;
    }
}

/* UI元素样式（模拟Android风格） */
.android-textview {
    padding: 8px 12px;
    font-family: 'Roboto', sans-serif;
    color: #333;
    background: transparent;
    border: 1px dashed #ddd;
    margin: 5px;
    border-radius: 4px;
}

.android-button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    margin: 5px;
    transition: background 0.2s ease;
}

.android-button:hover {
    background: #5a6fd8;
}

.android-edittext {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    margin: 5px;
    width: calc(100% - 20px);
    box-sizing: border-box;
}

.android-imageview {
    width: 100px;
    height: 100px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.android-linearlayout,
.android-relativelayout {
    padding: 10px;
    border: 1px dashed #667eea;
    margin: 5px;
    border-radius: 4px;
    min-height: 50px;
    background: rgba(102, 126, 234, 0.05);
}

/* 选中元素样式 */
.selected-element {
    outline: 2px solid #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* 属性分组 */
.property-group {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.property-group h5 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
}

/* 登录页面样式 */
#login {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-container {
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-forms {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-panel {
    display: none;
    padding: 30px;
}

.form-panel.active {
    display: block;
}

.login-forms form {
    max-width: 400px;
    margin: 0 auto;
}

.login-forms .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-forms label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.login-forms input[type="email"],
.login-forms input[type="password"],
.login-forms input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.login-forms input[type="email"]:focus,
.login-forms input[type="password"]:focus,
.login-forms input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
}

.form-footer {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* 响应式设计 - 登录页面 */
@media (max-width: 768px) {
    #login {
        padding: 20px;
        margin: 20px;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-header p {
        font-size: 1rem;
    }
    
    .form-panel {
        padding: 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    #login {
        margin: 10px;
        padding: 15px;
    }
    
    .login-header h2 {
        font-size: 1.3rem;
    }
    
    .form-panel {
        padding: 15px;
    }
}

/* 用户中心样式 */
#userCenter {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.user-dashboard {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.user-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.user-info h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-item {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.info-label {
    font-weight: 600;
    color: #555;
    margin-right: 10px;
}

.app-records h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.records-list {
    display: grid;
    gap: 15px;
}

.record-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.record-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.record-date {
    font-size: 0.9rem;
    color: #999;
}

.record-details {
    margin-bottom: 15px;
}

.record-description {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.record-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #777;
}

.record-platforms {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.platform-tag {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.no-records {
    text-align: center;
    color: #999;
    padding: 50px 0;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* 响应式设计 - 用户中心 */
@media (max-width: 1024px) {
    .user-dashboard {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    #userCenter {
        padding: 20px;
    }
    
    .record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .record-meta {
        flex-direction: column;
        gap: 5px;
    }
}