* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
    padding: 2rem;
    min-height: 100vh;
    position: relative;
}

.container {
    /* width: 1000px; */
    display: flex;
    justify-content: flex-start;
    
    /* margin: 0 auto; */
    position: relative;
    /* z-index: 1; */
}
.link{
    background-color: #1557b0;
    position: absolute;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    top: 0px;
    left: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* text-align: left; */
    /* margin: 0 auto; */
    /* left: 18.4%; */
}
.link a{
    color: white;
    text-decoration: none;
}
.link:hover{
    padding: 0.7rem 1.2rem;
}
.calculator-container{
    /* flex: 5; */
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

h1 {
    color: #1a73e8;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

input, select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex: 1;
    font-size: 1rem;
}

button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #1557b0;
}

.courses-list {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.course-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 6px;
}

.result {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8f0fe;
    border-radius: 6px;
    font-size: 1.5rem;
    color: #1a73e8;
}

.error {
    color: #dc3545;
    margin-bottom: 1rem;
    text-align: center;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}



.calculator-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.section-title {
    color: #1a73e8;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 0.5rem;
}

.toggle-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.toggle-btn {
    background: #e8f0fe;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: #1a73e8;
    color: white;
}

.cgpa-form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.semester-list {
    margin-top: 1rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.semester-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cgpa-result {
    background: #e8f0fe;
    color: #1a73e8;
}


/*CSS*/

footer{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    color: #555;
}
.footer-content{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.footer-content a {
    color: #007bff;
    text-decoration: none;
}

/*Responsive Breakpoints*/

/* =============== RESPONSIVE =============== */

@media (max-width: 992px) {
  .container {
    max-width: 100%;
    padding: 1.5rem;
    flex-direction: column;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .container {
    padding: 1rem;
  }

  .form-group,
  .cgpa-form-group {
    flex-direction: column;
    gap: 0.8rem;
  }

  .toggle-container {
    flex-direction: column;
    gap: 0.8rem;
  }

  .toggle-btn {
    width: 100%;
    text-align: center;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  .actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .actions button {
    width: 100%;
  }

  .result {
    font-size: 1.3rem;
  }
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
  }

  input,
  select {
    padding: 0.7rem;
    font-size: 0.95rem;
  }

  button {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  .link {
    position: static;
    display: inline-block;
    margin: 1rem 0;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0.8rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .form-group,
  .cgpa-form-group {
    gap: 0.5rem;
  }

  input,
  select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .result {
    font-size: 1.2rem;
    padding: 1rem;
  }

  .course-item {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem;
  }

  .course-item button {
    width: 100%;
    margin-top: 0.5rem;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  .toggle-container {
    flex-direction: column;
  }

  .toggle-btn {
    width: 100%;
  }
}

@media (max-width: 320px) {
  body {
    padding: 0.5rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  input,
  select {
    font-size: 0.85rem;
  }
}



