body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.game-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

h1 {
    color: #333;
    margin-bottom: 1.5rem;
}

.input-section {
    margin: 2rem 0;
}

input[type="number"] {
    padding: 0.5rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    width: 150px;
    margin-right: 1rem;
}

button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.result-section {
    margin-top: 1.5rem;
}

#message {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    min-height: 1.5rem;
}

#attempts {
    color: #666;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    animation: slideIn 0.3s ease-in-out;
}

.success {
    border: 4px solid #4CAF50;
    background-color: #f8fff8;
    animation: successAnimation 0.5s ease-in-out;
}

.failure {
    border: 4px solid #f44336;
    background-color: #fff8f8;
    animation: shake 0.5s ease-in-out;
}

.modal h2 {
    margin-top: 0;
    color: #333;
    font-size: 2rem;
}

.success h2 {
    background: linear-gradient(45deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 2s linear infinite;
}

.modal p {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.modal button {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #4CAF50, #2196F3);
    border: none;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.modal button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes successAnimation {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Confetti effect */
.success::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, transparent 20%, #4CAF50 20%, #4CAF50 80%, transparent 80%, transparent);
    background-size: 50px 50px;
    opacity: 0.1;
    animation: confetti 3s linear infinite;
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

.history-section {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.history-section h3 {
    color: #333;
    margin-bottom: 1rem;
}

#game-history {
    max-height: 200px;
    overflow-y: auto;
}

.game-record {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.game-record.success {
    border-left: 4px solid #4CAF50;
}

.game-record.failure {
    border-left: 4px solid #f44336;
}

.game-record .time {
    color: #666;
    font-size: 0.9rem;
}

.game-record .attempts {
    font-weight: bold;
}

/* Share Section Styles */
.share-section {
    margin: 20px 0;
    text-align: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #1DA1F2;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.share-button:hover {
    background-color: #1991db;
}

.share-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
} 