/*ChatGPT used to edit and enhance the styling of this flashcard app*/

*{
    box-sizing:border-box;
}

body{
    font-family:Segoe UI,Roboto,Arial,sans-serif;
    background:linear-gradient(180deg,#0f1724,#071426);
    color:#e6eef8;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:100vh;
    margin:0;
    padding:20px;
}

.card1 {
    background: rgba(255,255,255,0.03);
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    width: 90%;
    max-width: 400px;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

#login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    gap: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    background-color: rgba(255,255,255,0.03);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#login-button img {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

#login-button:hover {
    background-color: #004077;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.card{
    background:rgba(255,255,255,0.03);
    backdrop-filter:blur(6px);
    border-radius:12px;
    padding:20px;
    width:100%;
    max-width:720px;
    box-shadow:0 8px 30px rgba(0,0,0,0.6);
}

h1{
    margin:0 0 12px 0;
}

.actions{
    display:flex;
    gap:8px;
    margin-bottom:12px;
    flex-wrap:wrap; /* allow buttons to wrap on narrow screens */
}

button{
    padding:8px 12px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,0.06);
    background:rgba(255,255,255,0.02);
    color:inherit;
    cursor:pointer;
}

#sets .set{
    display:flex;
    justify-content:space-between;
    padding:10px;
    border-radius:8px;
    margin-bottom:8px;
    background:rgba(255,255,255,0.02);
    align-items:center;
    gap:8px;
    flex-wrap:wrap; /* let the set row wrap instead of overflowing */
}

#cards .card-row{
    display:flex;
    gap:8px;
    align-items:center;
    margin-bottom:8px;
    flex-wrap:wrap; /* allow card inputs to stack on small widths */
}

input{
    flex:1;
    padding:8px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,0.06);
    background:transparent;
    color:inherit;
    min-width:0; /* allow flex children to shrink correctly */
}

#card-box{
    min-height:160px;
    border-radius:10px;
    padding:18px;
    background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-size:18px;
    word-break:break-word;
    overflow-wrap:anywhere; /* break long words to avoid overflow */
}

.controls{
    display:flex;
    gap:8px;
    margin-top:12px;
    justify-content:center;
    flex-wrap:wrap; /* let control buttons wrap on small screens */
}

textarea{
    width:100%;
    padding:8px;
    border-radius:8px;
    margin-top:8px;
    background:transparent;
    color:inherit;
    border:1px solid rgba(255,255,255,0.06);
}

@media(max-width:600px){
    main.card{
        padding:12px;
        width: 80%;
    }
}