/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #003366;
    --accent-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

body {
    background-color: #f0f2f5;
    color: var(--dark-color);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    text-transform: uppercase;
}

header hr {
    width: 75%;
    margin: 15px auto;
    border: none;
    height: 2px;
    background: var(--primary-color);
}

/* Calculator styles */
.calculator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.calculator-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    width: 100%;
    max-width: 600px;
}

.calculator-card h2 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.input-group {
    margin-bottom: 20px;
}

.input-header {
    display: flex;
    justify-content: space-between;
    color: white;
    margin-bottom: 10px;
}

.input-header h3 {
    font-size: 1.2rem;
}

.number-inputs {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winning-numbers {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    flex-grow: 1;
}

.plus-sign {
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 10px;
}

.additional-number input {
    width: 100%;
}

input[type="text"] {
    width: 100%;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    background-color: white;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.3);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

#convertBtn {
    background-color: var(--success-color);
    color: white;
}

#convertBtn:hover {
    background-color: #218838;
}

#resetBtn {
    background-color: var(--danger-color);
    color: white;
}

#resetBtn:hover {
    background-color: #c82333;
}

.result-section {
    text-align: center;
}

.result-section h3 {
    color: white;
    margin-bottom: 10px;
}

.result-display {
    background-color: var(--accent-color);
    border-radius: 5px;
    padding: 15px;
    margin: 0 auto;
    max-width: 200px;
}

#resultText {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
}

/* Explanation section */
.explanation {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.explanation h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: #6c757d;
}

/* Responsive styles */
@media (max-width: 768px) {
    .winning-numbers {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
    }
    
    .number-inputs {
        flex-direction: column;
    }
    
    .plus-sign {
        margin: 10px 0;
    }
    
    .additional-number {
        width: 100%;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    button {
        width: 100%;
    }
}
