* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 16px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    min-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px 16px;
    text-align: center;
    position: relative;
}

.back-link {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.back-link:hover {
    background: rgba(255,255,255,0.2);
}

.back-link:active {
    background: rgba(255,255,255,0.3);
}

.header h1 {
    font-size: 18px;
    margin: 0;
}

.header-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
}

.content {
    flex: 1;
    padding: 20px;
}

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

.history-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.history-item:visited {
    color: inherit;
}

.history-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.history-item:active {
    background: #e2e8f0;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-date {
    font-size: 15px;
    color: #334155;
    font-weight: 500;
}

.history-theme {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

.history-preview {
    font-size: 18px;
    margin-top: 4px;
    letter-spacing: 2px;
}

.today-badge {
    background: #667eea;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 8px;
}

.days-ago {
    color: #94a3b8;
    font-size: 12px;
    margin-left: 8px;
}

.history-intro {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.history-item:hover {
    transform: translateX(4px);
}

.history-item:hover .history-arrow {
    transform: translateX(4px);
    color: #667eea;
}

.history-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-score {
    font-size: 14px;
    color: #64748b;
}

.history-time {
    font-size: 12px;
    color: #94a3b8;
}

.history-arrow {
    font-size: 16px;
    color: #94a3b8;
}

.header-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h2 {
    color: #334155;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 24px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.footer {
    text-align: center;
    padding: 24px 20px;
    font-size: 13px;
    color: #94a3b8;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
