/* 程序员今日运势 - 星空主题样式 */

:root {
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --primary: #9d4edd;
    --primary-light: #c77dff;
    --accent: #ff9e00;
    --text: #e0e0e0;
    --text-dim: #a0a0a0;
    --success: #00d9a3;
    --warning: #ff6b6b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
}

/* Header */
.header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
}

.moon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1rem;
}

/* Main */
.main {
    padding-bottom: 60px;
}

/* Input Section */
.input-section {
    margin-bottom: 40px;
}

.input-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(157, 78, 221, 0.3);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.input-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.input-card h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text);
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.github-prefix {
    padding: 12px 15px;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.input-group input::placeholder {
    color: var(--text-dim);
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(157, 78, 221, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(157, 78, 221, 0.5);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

.privacy-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 60px 0;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.crystal-ball {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.ball {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(157,78,221,0.6) 50%, rgba(157,78,221,0.3));
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.5), inset 0 0 20px rgba(255,255,255,0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--primary-light);
    margin-bottom: 30px;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading-steps span {
    color: var(--text-dim);
    opacity: 0.5;
    transition: all 0.3s;
}

.loading-steps span.active {
    color: var(--accent);
    opacity: 1;
    transform: translateX(10px);
}

/* Result Section */
.result-section {
    margin-bottom: 40px;
}

.fortune-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.fortune-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-text {
    display: flex;
    flex-direction: column;
}

.user-text span:first-child {
    font-weight: 600;
    font-size: 1.1rem;
}

.date {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.overall-score {
    text-align: center;
}

.overall-score span:first-child {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.label {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.fortune-level {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.fortune-level.good {
    background: rgba(0, 217, 163, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 217, 163, 0.3);
}

.fortune-level.bad {
    background: rgba(255, 107, 107, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Fortune Details */
.fortune-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.detail-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.detail-content {
    flex: 1;
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.detail-value {
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
}

.detail-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Fortune Advice */
.fortune-advice {
    background: rgba(157, 78, 221, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.fortune-advice h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-light);
}

/* Commit Insight */
.commit-insight {
    margin-bottom: 20px;
}

.commit-insight h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-dim);
}

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

.stat {
    text-align: center;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Lucky Item */
.lucky-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 158, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 25px;
}

.lucky-label {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.lucky-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* History Section */
.history-section {
    margin-top: 40px;
}

.history-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dim);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.history-username {
    font-weight: 500;
}

.history-score {
    font-weight: 600;
}

.history-score.good {
    color: var(--success);
}

.history-score.bad {
    color: var(--warning);
}

.history-date {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.empty {
    text-align: center;
    color: var(--text-dim);
    padding: 30px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        padding: 40px 0 30px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .input-card {
        padding: 30px 20px;
    }
    
    .fortune-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
