@import url('https://fonts.googleapis.com/css2?family=Crafty+Girls&family=Lexend+Deca:wght@100..900&display=swap');

*, html{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
}

body{
    background: #eaeaea url('assets/background.png') repeat center;
    font: normal 0.95em/160% 'Lexend Deca', 'Futura', 'Century Gothic', sans-serif;
    overflow-x: hidden;
}

main{
    width: 120vmin;
    margin: 2.5em auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2em;
    align-items: flex-start;
    justify-content: center;
}

.content{
    display: block;
    font-size: 1.2em;
    color: #333;
    margin-top: 1em;
     background: #fff;
    padding: 1em;
    border: 10px solid #fc6041;
    outline: 5px solid #ffef94;
    border-radius: 30px;
    position: relative;
}

#balls{
    grid-column: 1;
    grid-row: 1;
}

#cliques{
    grid-column: 2;
    grid-row: 1;
}

#footer{
    grid-column: 1;
    grid-row: 2;
grid-row-start: 1;
grid-row-end: 2;
align-self: end;
}

#ball-guy-1{
    position: absolute;
    top: 15%;
    left: -50%;
    width: 40vmin;
    height: 60vmin;
    background: url('assets/ball-guy-1.png') no-repeat center;
    background-size: contain;
}

#ball-guy-2{
    position: absolute;
    bottom: 15%;
    right: -50%;
    width: 40vmin;
    height: 60vmin;
    background: url('assets/ball-guy-2.png') no-repeat center;
    background-size: contain;
}

text{
    display: block;
    font-size: 0.9em;;
    color: #333;
    margin: 1em 0;
}

h1{
    font: normal 2.5em 'Crafty Girls', cursive;
    color: #fc6041;
    text-shadow: 1px 1px 0px #ffef94, -1px -1px 0px #ffef94, 1px -1px 0px #ffef94, -1px 1px 0px #ffef94;
    text-transform: lowercase;
    text-align: center;
    margin-bottom: -20px;
}

h2{
    font: normal 1.5em 'Lexend Deca', 'Futura', 'Century Gothic', sans-serif;
    color: #fc7941;
    text-align: center; 
    text-transform: lowercase;
    margin: 0.5em 0;
}

h2:first-child{
    margin-top: 0;
}

p{
    padding: 0.5em 0;
}

balls{
    display: block;
    margin: 1em auto;
    width: 350px;
    background: url('assets/ball-background.png') repeat center;
    padding: 1em;
    border: 5px solid #ffef94;
    border-radius: 20px;
}

ball-item{
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 5px;
}

balls img{
    image-rendering: pixelated;
}

cliques{
    display: block;
    margin: 0.5em auto 2em;
}

p.clique{
    text-align: center;
}

cliques textarea{
    display: block;
    width: 300px;
    height: 50px;
    margin: 0.5em auto;
    padding: 0.5em;
    font: normal 0.8em 'Inconsolata', monospace;
    color: #333;
    border: 3px solid #e46060;
    border-radius: 20px;
    background: url('assets/textarea-background.png') repeat center;
}

.footer{
    text-align: center;
    text-transform: uppercase;
}

a:link, a:visited{
    color: #607fe4;
    text-decoration: none;
}

a:hover{
    color: #f8ce6b;
    text-decoration: underline;
}

strong{
    color: #e46060;
    font-weight: bold;  
}

/* Fun selection styles */
::selection {
    background: #fc6041;
    color: #ffef94;
    text-shadow: none;
}

::-moz-selection {
    background: #fc6041;
    color: #ffef94;
    text-shadow: none;
}

/* Custom selection for different elements */
h1::selection {
    background: #ffef94;
    color: #fc6041;
    text-shadow: none;
}

h1::-moz-selection {
    background: #ffef94;
    color: #fc6041;
    text-shadow: none;
}

a::selection {
    background: #f8ce6b;
    color: #333;
}

a::-moz-selection {
    background: #f8ce6b;
    color: #333;
}

/* Tablet styles */
@media (max-width: 1024px) {
    main {
        width: 90vw;
        margin: 3em auto;
        gap: 1.5em;
    }
    
    .content {
        font-size: 1.1em;
        padding: 0.8em;
        border-width: 8px;
        outline-width: 4px;
        border-radius: 25px;
    }
    
    h1 {
        font-size: 2.2em;
        margin-top: -1.5em;
    }
    
    #ball-guy-1 {
        width: 35vmin;
        height: 50vmin;
        left: -45%;
    }
    
    #ball-guy-2 {
        width: 35vmin;
        height: 50vmin;
        right: -30%;
    }
}

/* iPad specific styles */
@media (max-width: 1024px) and (min-width: 769px) {
    main {
        width: 90vw;
        margin: 3em auto;
        grid-template-columns: 1fr;
        gap: 1.5em;
    }
    
    #balls {
        grid-column: 1;
        grid-row: 1;
    }
    
    #cliques {
        grid-column: 1;
        grid-row: 2;
    }
    
    #footer {
        grid-column: 1;
        grid-row: 3;
        grid-row-start: 3;
        grid-row-end: 4;
    }
    
    .content {
        font-size: 1.1em;
        padding: 0.8em;
        border-width: 8px;
        outline-width: 4px;
        border-radius: 25px;
    }
    
    h1 {
        font-size: 2.2em;
        margin-top: 0;
        margin-bottom: 0.5em;
    }
    
    #ball-guy-1, #ball-guy-2 {
        display: none;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    main {
        width: 95vw;
        margin: 2em auto;
        grid-template-columns: 1fr;
        gap: 1em;
    }
    
    #balls {
        grid-column: 1;
        grid-row: 1;
    }
    
    #cliques {
        grid-column: 1;
        grid-row: 2;
    }
    
    #footer {
        grid-column: 1;
        grid-row: 3;
        grid-row-start: 3;
        grid-row-end: 4;
    }
    
    .content {
        font-size: 1em;
        padding: 0.7em;
        border-width: 6px;
        outline-width: 3px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-top: 0;
        margin-bottom: 0.5em;
    }
    
    h2 {
        font-size: 1.3em;
    }
    
    balls {
        width: 100%;
        max-width: 350px;
    }
    
    cliques textarea {
        width: 100%;
        max-width: 280px;
    }
    
    #ball-guy-1, #ball-guy-2 {
        display: none;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    body {
        font-size: 0.85em;
    }
    
    main {
        margin: 1em auto;
    }
    
    .content {
        padding: 0.5em;
        border-width: 4px;
        outline-width: 2px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.5em;
        margin-top: 0;
        margin-bottom: 0.5em;
    }
    
    h2 {
        font-size: 1.2em;
    }
    
    balls {
        padding: 0.7em;
        max-width: 300px;
    }
    
    ball-item {
        width: 18px;
        height: 18px;
        margin: 3px;
    }
    
    cliques textarea {
        max-width: 250px;
        height: 40px;
        font-size: 0.7em;
    }
}