body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

#logo {
    width: 400px;
}

#puzzle-counter {
    font-size: 1.5em;
    color: #ccc;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 600;
}

.info-text {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #ccc;
}

#shape-canvas {
    background-color: #1e1e1e;
    border: 2px solid #333;
    border-radius: 10px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 500px;
    height: 500px;
}

.reference-line-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.reference-line {
    width: 100px; /* This will be set dynamically via JS */
    height: 2px;
    background-color: #fff;
}

.input-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#guess-input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #333;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 16px;
    width: 200px;
    text-align: center;
}

#guess-input:focus {
    outline: none;
    border-color: #4CAF50;
}

#guess-button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

#guess-button:hover:not(:disabled) {
    background-color: #45a049;
}

#guess-button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

#attempts {
    font-weight: bold;
    color: #4CAF50;
}

#message {
    margin-top: 20px;
    font-size: 18px;
    min-height: 30px;
}

#history-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 8px;
    width: 80%;
}

footer {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
}

#streak-container {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.promo-link {
    display: block;
    margin-bottom: 10px;
    color: #4CAF50;
}

.footer-text {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-text a {
    color: #4CAF50;
    text-decoration: none;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #2a2a2a;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
}

#share-score-button, .modal-button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
    text-decoration: none;
    display: block;
    margin: 10px auto;
}

.modal-subtext {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 5px;
}

.modal-link {
    display: block;
    margin-top: 20px;
    color: #4CAF50;
}

/* Responsive design */
@media (max-width: 520px) {
    h1 {
        font-size: 2em;
    }
    
    #shape-canvas {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 380px) {
    #shape-canvas {
        width: 300px;
        height: 300px;
    }
}