* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    padding: 0;
}

.app-container {
    width: 100%;
    max-width: 400px;
    background-color: #fff;
    min-height: 100vh;
    padding-bottom: 70px;
}

/* Header with fancy logo */
.header {
    background: linear-gradient(135deg, #ffd600 0%, #ffea00 100%);
    padding: 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.logo-area {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo-area:active {
    transform: scale(0.98);
}

.logo-main {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #d32f2f, #b71c1c, #ff6b6b, #d32f2f);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 1px;
    animation: shimmer 2s ease infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.logo-sub {
    font-size: 0.7rem;
    color: #b71c1c;
    font-weight: 500;
    letter-spacing: 2px;
}

.badge-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.badge-3d {
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.badge-2d {
    background: linear-gradient(135deg, #ff8f00, #e65100);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.badge-2d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Next Draw Card */
.next-card {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border-radius: 20px;
    padding: 25px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(244,67,54,0.3);
}

.next-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.next-date {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.next-time {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.value-box {
    background-color: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 20px;
}

.blink-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ff88;
    letter-spacing: 5px;
    animation: blink 1s step-end infinite;
}

.result-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffeb3b;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(255,235,59,0.5);
}

@keyframes blink {
    0%, 100% { opacity: 1; text-shadow: 0 0 5px #00ff88; }
    50% { opacity: 0.6; text-shadow: 0 0 15px #00ff88; }
}

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

.history-title {
    font-size: 1rem;
    font-weight: bold;
    color: #d32f2f;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    position: relative;
}

.history-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #f44336, #ff9800);
    border-radius: 3px;
}

.history-card {
    background: linear-gradient(135deg, #f44336, #e53935);
    color: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.history-card:active {
    transform: scale(0.98);
}

.history-date {
    font-size: 0.9rem;
    font-weight: 500;
}

.history-no {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffeb3b;
    letter-spacing: 2px;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 40px;
    background: #f5f5f5;
    border-radius: 12px;
    margin: 10px;
}

.loading {
    text-align: center;
    color: #f44336;
    padding: 40px;
}

.tap-hint {
    text-align: center;
    font-size: 0.7rem;
    color: #999;
    margin-top: 20px;
    padding: 10px;
}

@media (max-width: 500px) {
    .next-date { font-size: 1.3rem; }
    .blink-text { font-size: 2rem; }
    .result-value { font-size: 2.2rem; }
    .history-no { font-size: 1.3rem; }
    .logo-main { font-size: 1.3rem; }
    .badge-3d, .badge-2d { padding: 4px 10px; font-size: 0.75rem; }
}