:root {
    --primary: #4a00e0;
    --secondary: #8e2de2;
    --accent: #0a0072;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #ff0019;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #ff0000, #040404, #ff9500);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.ball {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.2));
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    animation: float 15s infinite ease-in-out;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, 40px) rotate(90deg); }
    50% { transform: translate(40px, 0) rotate(180deg); }
    75% { transform: translate(20px, -40px) rotate(270deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

header img {
    width: 70px;
    height: 70px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--danger);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

.user-info {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-generate {
    border-radius: 12px;
    background: rgba(10, 14, 23, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(64, 156, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
    padding: 15px 30px;
    display: block;
    margin: 20px auto;
}

.section {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--accent);
}

.prediction-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(64, 156, 255, 0.1);
}

.prediction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.prediction-card.selected {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
}

.prediction-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.white-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    color: var(--dark);
    font-weight: bold;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.powerball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.analysis-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.analysis-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--accent);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th, .history-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    background: var(--success);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateX(150%);
    transition: transform 0.3s;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.toggle-section {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-section::after {
    content: '▼';
    transition: transform 0.3s;
}

.toggle-section.collapsed::after {
    transform: rotate(-90deg);
}

.section-content {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.section-content.collapsed {
    max-height: 0;
}

@media (max-width: 768px) {
    .prediction-container {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
}