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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0a0a1f;
    color: #ffffff;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 31, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ffffff;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Main Container */
.main-container {
    padding: 6rem 2rem 2rem;
    min-height: 100vh;
    position: relative;
}

.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Editor Section */
.editor-card {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    position: absolute;
    right: 1rem;
    bottom: 0.8rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.divider {
    height: 1px;
    background: rgba(139, 92, 246, 0.2);
    margin: 2rem 0;
}

/* Gradient Options */
.gradient-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gradient-item {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s;
}

.gradient-item:hover {
    transform: translateY(-3px);
}

.gradient-preview {
    width: 100%;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.gradient-item.active .gradient-preview {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.gradient-item span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-area:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

.upload-icon {
    font-size: 2rem;
}

.upload-area span:last-child {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* User Input Group */
.user-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.avatar-upload {
    cursor: pointer;
}

.avatar-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid rgba(139, 92, 246, 0.5);
    transition: all 0.3s;
    background-size: cover;
    background-position: center;
}

.avatar-upload:hover .avatar-preview {
    transform: scale(1.05);
    border-color: #8b5cf6;
}

.user-input-group input {
    flex: 1;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

/* Preview Section */
.preview-container {
    position: sticky;
    top: 6rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.preview-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.card-preview {
    width: 420px;
    position: relative;
    z-index: 1;
}

.card-frame {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 32px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-background {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-inner {
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #a3e635;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(163, 230, 53, 0.6);
}

.card-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 2rem 0;
}

.card-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-tags span {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #a3e635, #84cc16);
    border: none;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(163, 230, 53, 0.4);
    transition: all 0.3s;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(163, 230, 53, 0.5);
}

.card-button span {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .preview-container {
        position: relative;
        top: 0;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 5rem 1rem 1rem;
    }
    
    .editor-card {
        padding: 1.5rem;
    }
    
    .gradient-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-preview {
        width: 100%;
        max-width: 400px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-title,
.card-text {
    animation: fadeIn 0.5s ease-out;
}
