/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.header p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-bottom: 30px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-submit {
    background-color: #2ecc71;
    color: white;
}

.btn-submit:hover {
    background-color: #27ae60;
}

.btn-cancel {
    background-color: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background-color: #c0392b;
}

.btn-refresh {
    background-color: #9b59b6;
    color: white;
}

.btn-refresh:hover {
    background-color: #8e44ad;
}

.btn-load-more {
    background-color: #3498db;
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-load-more:hover {
    background-color: #2980b9;
}

.btn-home {
    background-color: #34495e;
    color: white;
    display: block;
    text-align: center;
    margin: 20px auto;
}

.btn-home:hover {
    background-color: #2c3e50;
}

/* 表单样式 */
.secret-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 5px;
}

/* 心情选择器 */
.mood-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.mood-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-option i {
    margin-right: 5px;
}

.mood-selector input[type="radio"] {
    display: none;
}

.mood-selector input[type="radio"]:checked + label {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mood-option.happy {
    background-color: rgba(46,204,113,0.1);
    color: #2ecc71;
    border: 1px solid rgba(46,204,113,0.3);
}

.mood-option.sad {
    background-color: rgba(52,152,219,0.1);
    color: #3498db;
    border: 1px solid rgba(52,152,219,0.3);
}

.mood-option.angry {
    background-color: rgba(231,76,60,0.1);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.3);
}

/* 秘密卡片样式 */
.secrets-container {
    margin: 20px 0;
}

.secret-card {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s ease;
}

.secret-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.secret-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-word;
}

.secret-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.secret-date {
    font-style: italic;
}

.secret-id {
    font-family: monospace;
}

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 30px;
    display: none;
}

.loading-indicator .spinner {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

/* 错误消息 */
.error-message {
    text-align: center;
    padding: 30px;
    display: none;
}

.error-message i {
    font-size: 2.5rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-message p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* 没有秘密的提示 */
.no-secrets {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.no-secrets i {
    font-size: 3rem;
    color: #95a5a6;
    margin-bottom: 20px;
}

.no-secrets p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

.footer i {
    margin-right: 5px;
}

.disclaimer {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #bdc3c7;
}

.privacy-notice {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .mood-selector {
        flex-direction: column;
    }
    
    .secret-card {
        padding: 15px;
    }
}

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

.secret-card {
    animation: fadeIn 0.5s ease forwards;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-box button {
    padding: 0 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.search-box button:hover {
    background-color: #2980b9;
}

/* 控制按钮组 */
.secret-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

/* 提示框样式 */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    color: white;
    animation: slideIn 0.3s ease forwards;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert-success {
    background-color: #2ecc71;
}

.alert-error {
    background-color: #e74c3c;
}

.alert-info {
    background-color: #3498db;
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
