* {
    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: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 50%, #ffe0ea 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    color: #ff4d8d;
    font-size: 24px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.remaining {
    background: linear-gradient(135deg, #ff4d8d, #ff6b9d);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.btn-reset {
    background: #f5f5f5;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

/* Upload Section */
.upload-section {
    margin: 30px 0;
}

.upload-area {
    background: white;
    border: 2px dashed #ffcce0;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #ff4d8d;
    background: #fff5f8;
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffe8f0, #ffcce0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.upload-icon svg {
    width: 40px;
    height: 40px;
    fill: #ff4d8d;
}

.upload-text {
    font-size: 18px;
    color: #ff4d8d;
    font-weight: 600;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 14px;
    color: #999;
}

/* QQ Group Section */
.qq-group-section {
    margin: 20px 0;
}

.qq-group-card {
    background: linear-gradient(135deg, #ffe8f0, #ffd6e8);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.qq-group-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qq-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.qq-text h4 {
    font-size: 14px;
    color: #333;
}

.qq-text p {
    font-size: 12px;
    color: #666;
}

.arrow {
    font-size: 24px;
    color: #ff4d8d;
}

/* Announcement Section */
.announcement-section {
    margin: 20px 0;
}

.announcement-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
}

.announcement-card h3 {
    color: #ff4d8d;
    font-size: 16px;
    margin-bottom: 15px;
}

.announcement-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 8px;
}

.announcement-content strong {
    color: #333;
}

/* Device Selection */
.device-section {
    margin: 20px 0;
}

.selected-files {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.selected-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.selected-files-header h3 {
    font-size: 16px;
    color: #333;
}

.btn-add-more {
    background: linear-gradient(135deg, #ffe8f0, #ffd6e8);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #ff4d8d;
    cursor: pointer;
}

.file-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.file-thumb {
    width: 100px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-thumb .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #ff4d8d;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
}

.file-name {
    font-size: 10px;
    color: #666;
    text-align: center;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Brand Tabs */
.brand-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.brand-tab {
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #ffe8f0;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.brand-tab.active {
    background: linear-gradient(135deg, #ff4d8d, #ff6b9d);
    color: white;
    border-color: transparent;
}

/* Device Grid */
.device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.device-btn {
    padding: 12px 8px;
    border: 2px solid #ffe8f0;
    border-radius: 10px;
    background: white;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.device-btn:hover {
    border-color: #ff4d8d;
    color: #ff4d8d;
}

.device-btn.selected {
    background: linear-gradient(135deg, #ff4d8d, #ff6b9d);
    color: white;
    border-color: transparent;
}

/* EXIF Edit Section */
.edit-section {
    margin: 20px 0;
}

.edit-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(255, 77, 141, 0.1);
}

.edit-card-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: linear-gradient(135deg, #fff5f8, #ffe8f0);
}

.edit-card-header h3 {
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-card-header .icon {
    width: 24px;
    height: 24px;
    fill: #ff4d8d;
}

.edit-card-header .toggle-icon {
    font-size: 20px;
    color: #999;
    transition: transform 0.3s ease;
}

.edit-card-header .toggle-icon.expanded {
    transform: rotate(180deg);
}

.edit-card-body {
    padding: 20px;
    display: none;
}

.edit-card-body.expanded {
    display: block;
}

/* Form Inputs */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffe8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff5f8;
    color: #333;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ff4d8d;
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Resolution Quick Select */
.resolution-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.resolution-option {
    padding: 8px 12px;
    border: 2px solid #ffe8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
}

.resolution-option:hover,
.resolution-option.active {
    border-color: #ff4d8d;
    color: #ff4d8d;
    background: #fff5f8;
}

/* Bottom Actions */
.bottom-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-clear {
    flex: 1;
    padding: 15px;
    border: 2px solid #ffe8f0;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    color: #666;
    cursor: pointer;
}

.btn-export {
    flex: 2;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff4d8d, #ff6b9d);
    font-size: 16px;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

/* Download Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

.modal-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin: 15px 0;
}

.download-tip {
    background: #ffe8f0;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #ff4d8d;
    margin-bottom: 15px;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-action {
    padding: 12px;
    border: 2px solid #ffe8f0;
    border-radius: 10px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.download-action:hover {
    background: #fff5f8;
}

.btn-download {
    background: linear-gradient(135deg, #ff4d8d, #ff6b9d);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
}

/* Admin Styles */
.admin-login {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-login h2 {
    text-align: center;
    color: #ff4d8d;
    margin-bottom: 30px;
}

.admin-login .form-group {
    margin-bottom: 20px;
}

.btn-login {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff4d8d, #ff6b9d);
    color: white;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
}

/* Admin Dashboard */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    color: #ff4d8d;
}

.btn-logout {
    padding: 10px 20px;
    border: 2px solid #ff4d8d;
    border-radius: 8px;
    background: white;
    color: #ff4d8d;
    cursor: pointer;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #ff4d8d;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Admin Tables */
.admin-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-card h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: #fff5f8;
    color: #666;
    font-weight: 600;
}

.data-table tr:hover {
    background: #fff5f8;
}

.btn-danger {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #ff4d8d;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.btn-warning {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #ffa500;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .device-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* GPS Map */
#gpsMap {
    border: 2px solid #ffe8f0;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
}

.leaflet-container {
    font-family: inherit;
}
