/* 重置樣式 */
* {
    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, #ffeef8 0%, #fff5f5 50%, #fef7f0 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* 導航欄 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 182, 193, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(255, 105, 135, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #ff6b87;
    text-decoration: none;
}

.nav-logo a {
    color: inherit;
    text-decoration: none;
}

.nav-logo i {
    margin-right: 8px;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    background: rgba(255, 107, 135, 0.1);
    color: #ff6b87;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: rgba(255, 107, 135, 0.1);
    border-radius: 25px;
}

.user-avatar, .user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff6b87;
}

.user-avatar-small {
    width: 24px;
    height: 24px;
}

.logout-btn {
    background: #ff6b87;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ff5577;
    transform: translateY(-1px);
}

/* 主內容 */
.main-content {
    margin-top: 80px;
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 圖片網格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.image-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(255, 105, 135, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 105, 135, 0.25);
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-container img {
    transform: scale(1.05);
}

.card-content {
    padding: 15px;
}

.image-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.image-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.card-actions {
    display: flex;
    gap: 15px;
}

.like-btn, .comment-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    color: #ff6b87;
}

.comment-btn:hover {
    color: #ff6b87;
}

.like-btn.liked {
    color: #ff6b87;
}

.like-btn.liked i {
    color: #ff6b87;
}

.likes-display {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 14px;
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 64px;
    color: #ff6b87;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 30px;
}

/* 按鈕樣式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b87, #ff8fa3);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 135, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff5577, #ff7e99);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 135, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e5e5e5;
    color: #333;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* 認證頁面 */
.auth-page {
    background: linear-gradient(135deg, #ff6b87, #ff8fa3, #ffb3c1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(255, 107, 135, 0.3);
}

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

.auth-header i {
    font-size: 48px;
    color: #ff6b87;
    margin-bottom: 15px;
}

.auth-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b87;
    box-shadow: 0 0 0 3px rgba(255, 107, 135, 0.1);
}

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

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #ff6b87;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 上傳頁面 */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(255, 107, 135, 0.15);
}

.upload-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.upload-form .form-group {
    margin-bottom: 25px;
}

.file-upload-area {
    position: relative;
    border: 2px dashed #ff6b87;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 107, 135, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    background: rgba(255, 107, 135, 0.1);
    border-color: #ff5577;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder i {
    font-size: 48px;
    color: #ff6b87;
    margin-bottom: 15px;
}

.upload-placeholder p {
    color: #666;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 107, 135, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

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

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* 模態框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #ff6b87;
    background: white;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .user-menu span {
        display: none;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .upload-container {
        margin: 20px 15px;
        padding: 30px 20px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-logo span {
        display: none;
    }
    .asss{
    display:block;
}
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (min-width: 769px) {
    .asss{
    display: flex;
    }
}

.image-card {
    animation: fadeIn 0.5s ease-out;
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ff6b87;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff5577;
}
