* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.logout-btn:active {
    transform: translateY(0);
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.my-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.numbers-label {
    font-size: 18px;
    font-weight: bold;
    color: #555;
}

.numbers-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin: 0 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.red-ball {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.blue-ball {
    background: linear-gradient(135deg, #4dabf7, #228be6);
    color: white;
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-refresh {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-refresh:active {
    transform: translateY(0);
}

.query-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.period-input {
    width: 120px;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.period-input:focus {
    border-color: #667eea;
}

.period-input::placeholder {
    color: #adb5bd;
}

.query-separator {
    color: #666;
    font-size: 14px;
    margin: 0 5px;
}

.btn-query {
    background: linear-gradient(135deg, #51cf66, #37b24d);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-query:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(81, 207, 102, 0.4);
}

.btn-query:active {
    transform: translateY(0);
}

.update-info {
    color: #666;
    font-size: 14px;
}

.summary-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.summary-label {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.summary-value.highlight {
    color: #ff6b6b;
}

.summary-value.prize {
    color: #51cf66;
}

.results-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.results-container h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.result-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.result-item.winning {
    border-color: #51cf66;
    background: linear-gradient(135deg, #f0fff4, #ffffff);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.period-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.period {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.date {
    color: #888;
    font-size: 14px;
}

.prize-amount {
    font-size: 24px;
    font-weight: bold;
    color: #51cf66;
}

.prize-amount.zero {
    color: #adb5bd;
}

.draw-numbers {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.numbers-row {
    display: flex;
    gap: 5px;
    align-items: center;
}

.win-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.win-details-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.win-item {
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.win-item:last-child {
    border-bottom: none;
}

.win-level {
    color: #ff6b6b;
    font-weight: bold;
}

.win-prize {
    color: #51cf66;
    font-weight: bold;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #adb5bd;
    font-size: 18px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #adb5bd;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    .my-numbers {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ball {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
