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

:root {
    --primary-purple: #7B2D8E;
    --secondary-purple: #9B4DCA;
    --light-purple: #E1BEE7;
    --dark-purple: #4A148C;
    --accent-purple: #BA68C8;
    --gradient-start: #9B4DCA;
    --gradient-end: #7B2D8E;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #6c757d;
    --gray-700: #495057;
    --gray-900: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 10px 40px rgba(123, 45, 142, 0.2);
    --shadow-hover: 0 15px 50px rgba(123, 45, 142, 0.3);
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--primary-purple) 50%, var(--dark-purple) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.form-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-purple), var(--primary-purple), var(--accent-purple));
}

.logo-area {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-purple), var(--primary-purple));
    color: var(--white);
    border-radius: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(123, 45, 142, 0.3);
}

.logo-icon.small {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 10px;
}

.form-card h1 {
    color: var(--gray-900);
    font-size: 26px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    margin-bottom: 10px;
}

.subtitle {
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 30px;
    font-size: 15px;
}

.section-title {
    color: var(--primary-purple);
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.label-icon {
    margin-right: 5px;
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--gray-100);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-purple);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(155, 77, 202, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-500);
}

.photo-upload-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(155, 77, 202, 0.05), rgba(123, 45, 142, 0.05));
    border-radius: 16px;
    border: 2px dashed var(--light-purple);
}

.photo-upload-section .instruction {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.photo-item {
    position: relative;
}

.photo-input {
    display: none;
}

.photo-label {
    display: block;
    cursor: pointer;
}

.photo-preview {
    aspect-ratio: 1;
    border: 2px dashed var(--light-purple);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--white);
    transition: all 0.3s ease;
    overflow: hidden;
}

.photo-preview:hover {
    border-color: var(--secondary-purple);
    background: rgba(155, 77, 202, 0.05);
}

.photo-preview.has-image {
    border: none;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-icon {
    font-size: 32px;
    color: var(--secondary-purple);
    margin-bottom: 5px;
}

.photo-text {
    font-size: 12px;
    color: var(--gray-500);
}

.photo-hint {
    color: var(--gray-500);
    font-size: 12px;
    text-align: center;
}

.info-section {
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-purple), var(--primary-purple));
    color: var(--white);
    width: 100%;
    box-shadow: 0 5px 20px rgba(123, 45, 142, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(123, 45, 142, 0.4);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-record {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    color: var(--white);
    min-width: 180px;
}

.btn-record:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-record.recording {
    animation: pulse-record 1s infinite;
}

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(220, 53, 69, 0); }
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-arrow {
    font-size: 18px;
}

.btn-icon {
    font-size: 16px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.button-group .btn {
    width: auto;
    min-width: 140px;
}

.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 20px;
}

.step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--white);
    color: var(--primary-purple);
    transform: scale(1.15);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.step.completed {
    background: var(--success);
    color: var(--white);
}

.step-line {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 5px;
}

.step-line.completed {
    background: var(--success);
}

.form-section {
    margin-bottom: 25px;
}

.form-sections {
    margin-bottom: 20px;
}

.recording-section {
    background: linear-gradient(135deg, rgba(155, 77, 202, 0.05), rgba(123, 45, 142, 0.05));
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.recording-text-box {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid var(--light-purple);
}

.recording-label {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 10px;
}

.recording-text {
    color: var(--primary-purple);
    font-size: 16px;
    line-height: 1.8;
    font-weight: 500;
}

.recording-controls {
    text-align: center;
}

.recording-status {
    margin-bottom: 15px;
}

.status-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.status-icon.recording-icon {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-text {
    font-size: 16px;
    color: var(--gray-500);
}

.recording-timer {
    font-size: 36px;
    font-weight: bold;
    color: var(--danger);
    margin: 15px 0;
}

.audio-visualizer {
    display: flex;
    justify-content: center;
    gap: 5px;
    height: 40px;
    align-items: flex-end;
    margin: 15px 0;
}

.bar {
    width: 8px;
    background: var(--secondary-purple);
    border-radius: 4px;
    animation: wave 0.5s ease-in-out infinite;
}

.bar:nth-child(1) { animation-delay: 0s; height: 20px; }
.bar:nth-child(2) { animation-delay: 0.1s; height: 30px; }
.bar:nth-child(3) { animation-delay: 0.2s; height: 25px; }
.bar:nth-child(4) { animation-delay: 0.3s; height: 35px; }
.bar:nth-child(5) { animation-delay: 0.4s; height: 20px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.button-row {
    margin-top: 20px;
}

.audio-preview {
    margin-top: 20px;
    padding: 15px;
    background: var(--white);
    border-radius: 12px;
}

.audio-preview audio {
    width: 100%;
    margin-bottom: 10px;
}

.success-card {
    text-align: center;
}

.success-animation {
    margin-bottom: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), #20c997);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.success-message {
    color: var(--gray-500);
    margin-bottom: 25px;
    font-size: 16px;
}

.process-number-box {
    background: linear-gradient(135deg, rgba(155, 77, 202, 0.1), rgba(123, 45, 142, 0.1));
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 2px solid var(--light-purple);
}

.process-label {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 10px;
}

.process-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-purple);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.process-hint {
    color: var(--gray-500);
    font-size: 13px;
}

.success-info {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.admin-login-card {
    max-width: 400px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--secondary-purple);
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

.admin-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.admin-header {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header h1 {
    color: var(--gray-900);
    font-size: 22px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.settings-section {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.settings-section h2 {
    color: var(--gray-900);
    margin-bottom: 20px;
    font-size: 20px;
}

.settings-group-title {
    color: var(--primary-purple);
    font-size: 16px;
    margin: 25px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-purple);
}

.settings-group-title:first-of-type {
    margin-top: 0;
}

.data-section {
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.data-section h2 {
    color: var(--gray-900);
    margin-bottom: 20px;
    font-size: 20px;
}

.no-data {
    text-align: center;
    color: var(--gray-500);
    padding: 40px;
}

@media (max-width: 768px) {
    .form-card {
        padding: 25px;
    }
    
    .form-card h1 {
        font-size: 22px;
    }
    
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
    }
}
