/* General Styles */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 50vh;
  background-color: #ffff;
}

.container {
  width: 100%;
  max-width: 2000px;
  background-color: white;
  padding: 0px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

h2 {
  margin-bottom: 20px;
  text-align: center;
}

/* Progress Bar Styles */
.progress-container {
  width: 100%;
  height: 20px;
  background-color: #eee;
  border-radius: 5px;
  margin-bottom: 20px;
  overflow: hidden; /* To hide the overflow */
}

.progress-bar {
  height: 100%;
  width: 0%; /* Start from 0% */
  background-color: red; /* Default red */
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
}

.progress-bar[style*="background-color: red"] {
    background-color: red;
}
.progress-bar[style*="background-color: yellow"] {
    background-color: yellow;
}
.progress-bar[style*="background-color: green"] {
    background-color: green;
}

/* List Selection & Upload Styles */

.list-section{
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  width: 100%
}
#list-selector{
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.upload-button {
  display: inline-block;
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 10px;
  text-align: center;
}
.upload-button:hover {
  background-color: #0056b3;
}

/* Flashcard Styles */
.flashcard-container {
  perspective: 1000px;
  margin-bottom: 20px;
  width: 100%;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 200px;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s; /* Added transition to .flashcard-inner */
}

.flashcard-front,
.flashcard-back
 {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
  backface-visibility: hidden;
  font-size: 30px; 
  font-weight: bold; 
}

.flashcard-back {
  transform: rotateY(180deg);
}

/* Category Buttons Styles */
.category-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 100px
}

.category-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #eee;
  transition: background-color 0.3s ease;
}

.category-btn:hover {
    background-color: #ddd;
}
.category-btn[data-category="hard"] {
    box-shadow: 5px 9px 7px 0px #cfd6cb;
	background:linear-gradient(to bottom, #eb0000 5%, #9c0000 100%);
	background-color:#eb0000;
	border-radius:28px;
	border:1px solid #780000;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:20px;
	padding:17px 31px;
	text-decoration:none;
	text-shadow:0px 1px 0px #8a5b64;
}
.category-btn[data-category="hard"]:hover {
    background:linear-gradient(to bottom, #9c0000 5%, #eb0000 100%);
	background-color:#9c0000;
}
.category-btn[data-category="easy"] {
    box-shadow: 5px 9px 7px 0px #cfd6cb;
	background:linear-gradient(to bottom, #00eb3f 5%, #5cbf2a 100%);
	background-color:#00eb3f;
	border-radius:28px;
	border:1px solid #18ab29;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:20px;
	padding:17px 31px;
	text-decoration:none;
	text-shadow:0px 1px 0px #2c801f;
}
.category-btn[data-category="easy"]:hover {
    background:linear-gradient(to bottom, #5cbf2a 5%, #00eb3f 100%);
	background-color:#5cbf2a;
}
.speak-button{
  box-shadow:inset 0px 1px 3px 0px #91b8b3;
	background:linear-gradient(to bottom, #abd1c7 5%, #89a3a3 100%);
	background-color:#abd1c7;
	border-radius:5px;
	border:1px solid #566963;
	display:inline-block;
	cursor:pointer;
	color:#ffffff;
	font-family:Arial;
	font-size:15px;
	font-weight:bold;
	padding:7px 20px;
	text-decoration:none;
	text-shadow:0px -1px 0px #2b665e;
    margin-left: 10px;

}

.speak-button:hover {
    background:linear-gradient(to bottom, #89a3a3 5%, #abd1c7 100%);
	background-color:#89a3a3;
}

/* Remaining Words Counter Styles */
.remaining-words {
  text-align: center;
  margin-bottom: 20px;
}

/* Message Container Styles */
.message-container {
  text-align: center;
  margin-bottom: 20px;
}

/*Modal Styles*/
.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: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px
}

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

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

#list-editor{
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.list-item{
    display: flex;
    align-items: center;
    gap: 10px;
}
.list-item input{
   flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 0;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Responsive styles */
@media(max-width: 600px) {
    .container{
        width: 95%
    }
     .flashcard{
        height: 150px;
     }
}

.responsive-iframe-container {
  position: relative;
  padding-bottom: 100%; /* Aspect ratio (adjust as needed) */
  height: 0;
  overflow: hidden;
}

.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}