/* =========================================
   Newsletter Platform - Modern UI Styles
   ========================================= */

/* CSS Variables (Design Tokens) */
:root {
    /* Primary Colors - Modern Gradient Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    
    /* Secondary Colors */
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    
    /* Accent Colors */
    --accent-color: #06b6d4;
    --accent-light: #cffafe;
    
    /* Status Colors */
    --success-color: #10b981;
    --success-alt: #20c997;  /* 替代原硬编码颜色 */
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --dark-text: #1e293b;
    --body-text: #475569;
    --muted-text: #94a3b8;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* =========================================
   Base Styles
   ========================================= */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--body-text);
    background-color: var(--light-bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-text);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* =========================================
   Navbar Styles
   ========================================= */

.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--body-text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    margin: 0 0.25rem;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
}

/* =========================================
   Hero Section
   ========================================= */

.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 120px 0 80px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-stats {
    margin-top: 3rem;
}

.hero-stats .stats-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-stats .stats-label {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   Card Styles
   ========================================= */

.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    background: var(--card-bg);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.card-body {
    padding: 2.5rem;
}

.card-title {
    color: var(--dark-text);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.card-header {
    background: linear-gradient(to right, var(--light-bg), var(--white));
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
}

/* =========================================
   Step Indicator
   ========================================= */

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 180px;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.25rem;
    left: calc(50% + 1.5rem);
    width: calc(100% - 3rem);
    height: 3px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.step.completed:not(:last-child)::after {
    background: var(--success-color);
}

.step-number {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-full);
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    color: var(--muted-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.step.active .step-number {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}

.step.completed .step-number {
    background: var(--success-color);
    border-color: transparent;
    color: white;
}

.step-title {
    font-size: 0.875rem;
    color: var(--muted-text);
    font-weight: 600;
    text-align: center;
    transition: var(--transition-fast);
}

.step.active .step-title {
    color: var(--primary-color);
}

.step.completed .step-title {
    color: var(--success-color);
}

/* =========================================
   Form Styles
   ========================================= */

.form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--white);
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--muted-text);
}

.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-check {
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: -2rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-check-input[type="radio"] {
    border-radius: var(--radius-full);
}

.form-check-label {
    color: var(--body-text);
    cursor: pointer;
    font-weight: 500;
}

.form-text {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-top: 0.5rem;
}

.invalid-feedback {
    font-size: 0.85rem;
    color: var(--danger-color);
}

/* =========================================
   Button Styles
   ========================================= */

.btn {
    font-weight: 600;
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    background: var(--primary-gradient);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--body-text);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--dark-text);
    border-color: var(--border-color);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--light-bg);
    color: var(--dark-text);
    border-color: var(--border-color);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* =========================================
   Status Badges
   ========================================= */

.status-badge {
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: var(--success-light);
    color: var(--success-color);
}

.status-inactive {
    background: var(--danger-light);
    color: var(--danger-color);
}

.status-pending {
    background: var(--warning-light);
    color: var(--warning-color);
}

/* =========================================
   Alert Styles
   ========================================= */

.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
}

/* =========================================
   Loading Overlay
   ========================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    color: var(--primary-color);
}

/* =========================================
   Modal Styles
   ========================================= */

.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

/* =========================================
   Confirmation Section
   ========================================= */

.bg-light {
    background: var(--light-bg) !important;
    border-radius: var(--radius-lg);
}

#confirmation-details {
    font-size: 0.95rem;
}

#confirmation-details div {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

#confirmation-details div:last-child {
    border-bottom: none;
}

/* =========================================
   Animations
   ========================================= */

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* =========================================
   Responsive Adjustments
   ========================================= */

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats .stats-number {
        font-size: 2rem;
    }
    
    .step-indicator {
        gap: 0;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .step {
        max-width: 100px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-stats .col-md-4 {
        margin-bottom: 1.5rem;
    }
    
    .step-title {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* =========================================
   Utilities
   ========================================= */

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--primary-gradient);
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
}
