* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --container-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --header-bg: #252525;
    --section-bg: #2a2a2a;
    --import-bg: #121c3d;
    --border-bg: #4684a1;
    --import-text: #dbe6f7;
    --form-bg: #252525;
    --subject-bg: #2a2a2a;
    --border-color: #404040;
    --warning-bg: #3a3a2a;
    --warning-border: #5a5a2a;
    --warning-text: #d4c851;
    --ira-total-bg: #1a2332;
    --locked-header-bg: #2a2a2a;
    --shadow: 0 10px 30px rgba(0,0,0,0.6);
    --subject-shadow: 0 2px 5px rgba(0,0,0,0.3);
    --fa-color: #F1F1F1;
    --info-bg: #181f30;
    --info-border: #465a6d6e;
    --info-text: #e7e3e3ef;
}

[data-theme="light"] {
    --bg-gradient: linear-gradient(135deg, #4a4e5e 0%, #260d3f 100%);
    --container-bg: white;
    --text-color: #333;
    --text-secondary: #666;
    --import-bg: #dce3f7;
    --border-bg: #437994;
    --import-text: #2e4769;
    --header-bg: linear-gradient(45deg, #2196F3, #21CBF3);
    --section-bg: #f5f5f5;
    --form-bg: #f1f1f1;
    --subject-bg: white;
    --border-color: #ddd;   
    --warning-bg: #fff3cd;
    --warning-border: #ffeaa7;
    --warning-text: #856404;
    --ira-total-bg: #e3f2fd;
    --locked-header-bg: #f8f9fa;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --subject-shadow: 0 2px 5px rgba(0,0,0,0.1);
    --fa-color: #000;
    --info-bg: #f0f0f0;
    --info-border: #dcdcdc;
    --info-text: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=SN+Pro:ital,wght@0,200..900;1,200..900&family=VT323&display=swap');

body {
    font-family: 'Roboto Mono', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--container-bg);
    min-height: 100vh;
    margin: 0;
    transition: all 0.3s ease;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.logo-img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.header {
    background: var(--header-bg);
    color: white;
    padding:20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: var(--border-color) 1px solid;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.github-link {
    color: var(--fa-color);
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.btn-theme-toggle {
    background: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1em 1em;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.doe-section {
    margin: 20px 0;
    background: var(--form-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.content {
    flex: 1;
    padding: 30px;
    background: var(--container-bg);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.warning-section {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--warning-text);
    transition: all 0.3s ease;
}

.info-section {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: var(--info-text);
    text-align: justify;
    transition: all 0.3s ease;
}

.warning-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.locked-courses-section {
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.locked-header {
    background: var(--locked-header-bg);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.locked-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.locked-total {
    font-size: 16px;
    color: #dc3545;
    font-weight: bold;
}

.semester-section {
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.import-courses-section {
    margin-bottom: 30px;
    background-color: var(--import-bg);
    border: 1px dashed var(--border-bg);
    padding: 30px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--import-text);
    text-align: center;
    font-size: x-large;
}

.semester-header {
    background: var(--section-bg);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.semester-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.semester-ira {
    font-size: 16px;
    color: #2196F3;
    font-weight: bold;
}

.btn-edit {
    background: none;
    border: none;
    color: var(--fa-color);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
}

.edit-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--subject-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.btn-save {
    background: #4caf4f8f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f4433686;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.form-section {
    padding: 8px;
    background: var(--form-bg);
    transition: all 0.3s ease;
}

.form-group {
    display: grid;
    grid-template-columns: 4fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.locked-form-group {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.locked-form-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--subject-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--subject-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--subject-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-add {
    background: #4CAF50;
    color: white;
}

.btn-add:hover {
    background: #45a049;
}

input {
    -moz-appearance: textfield;
    appearance: textfield;
}

input::-webkit-inner-spin-button,
  input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

.btn-remove {
    color: var(--text-color);
    background: none;
    line-height: 5px;
    width: 2em;
    height: 2em;
}

.btn-remove:hover {
    color: #fff;
}

.btn-semester {
    background: #2196F3;
    color: white;
    margin-bottom: 20px;
}

.btn-semester:hover {
    background: #1976D2;
}

.subjects-list {
    padding: 8px;
    background: var(--container-bg);
    transition: all 0.3s ease;
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.subject-item {
    display: grid;
    grid-template-columns: 4fr 1fr 1fr 2fr auto;
    gap: 15px;
    padding: 12px 16px;
    background: var(--subject-bg);
    border-radius: 8px;
    box-shadow: var(--subject-shadow);
    align-items: center;
    transition: all 0.3s ease;
}

.locked-item {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 15px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--subject-bg);
    border-radius: 5px;
    box-shadow: var(--subject-shadow);
    align-items: center;
    transition: all 0.3s ease;
}

.subject-name {
    font-weight: bold;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.subject-hours {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.subject-status {
    color: var(--text-secondary);
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.subject-grade {
    color: #2196F3;
    font-weight: bold;
    text-align: end;
    padding: 0px 20px;
}

.ira-total {
    text-align: center;
    padding: 20px;
    background: var(--ira-total-bg);
    margin-top: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ira-geral-section {
    text-align: center;
    padding: 20px;
    background: var(--form-bg);
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.ira-geral-section h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.ira-geral-form {
    margin-bottom: 20px;
}

.ira-geral-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.ira-geral-inputs input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--subject-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    min-width: 340px;
}

.btn-calculate {
    background: #ff9800;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-calculate:hover {
    background: #e68900;
}

.ira-geral-result {
    padding: 15px;
    background: var(--ira-total-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ira-geral-info {
    margin-top: 10px;
    color: var(--text-secondary);
    font-style: italic;
    transition: all 0.3s ease;
}

.ira-value {
    font-size: 24px;
    font-weight: bold;
    color: #1976D2;
}

/* Backup section styles */
.backup-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--form-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.backup-section h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.backup-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-backup, .btn-backup-min, .btn-import, .btn-clear {
    background: #17a2b8;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: all 0.3s;
}

.btn-backup:hover, .btn-backup-min:hover, .btn-import:hover {
    background: #21abc0;
}

.btn-clear {
    background: #dc3545;
}

.btn-clear:hover {
    background: #c82333;
}

.btn-star {
    background-color: #d48611;
    color: var(--text-color);
}

.btn-file {
    font-size: large;
}

.donate {
    text-align: center;
    border-radius: 4px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #fd79a8);
    background-size: 400% 400%;
    animation: rainbow 3s ease infinite;
    text-underline-position: 90px;
    padding: 5px 10px;
    text-decoration: none;
    margin-right: 15px;
    font-size: small;
    font-family: monospace;
    color: var(--header-bg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.donate:hover {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.3);
}
.donate:active {
    transform: scale(0.95);
    background-color: linear-gradient(60deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #fd79a8);
}

.doe{
    font-size: large;
}

@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 768px) {
    .logo-img {
        width: 40px;
        height: 40px;
        margin-left: 14px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-links {
        gap: 20px;
    }

    .header-content {
        text-align: center;
        text-wrap: nowrap;
    }
    
    .form-group, .locked-form-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .donate {
        margin: 0px;
    }
    
    .backup-buttons {
        flex-direction: column;
    }

    .btn-semester {
        margin: auto;
        border-radius: 50px;
    }

    .center {
        display: flex;
        justify-content: center;
    }
    
    .content {
        padding: 20px;
    }
    
    .ira-geral-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ira-geral-inputs input {
        min-width: auto;
        width: 100%;
    }
}

.wrapper {
  background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
  background-size: 1800% 1800%;
  
  -webkit-animation: rainbow 18s ease infinite;
  -z-animation: rainbow 18s ease infinite;
  -o-animation: rainbow 18s ease infinite;
    animation: rainbow 18s ease infinite;}
  
  @-webkit-keyframes rainbow {
      0%{background-position:0% 82%}
      50%{background-position:100% 19%}
      100%{background-position:0% 82%}
  }
  @-moz-keyframes rainbow {
      0%{background-position:0% 82%}
      50%{background-position:100% 19%}
      100%{background-position:0% 82%}
  }
  @-o-keyframes rainbow {
      0%{background-position:0% 82%}
      50%{background-position:100% 19%}
      100%{background-position:0% 82%}
  }
  @keyframes rainbow { 
      0%{background-position:0% 82%}
      50%{background-position:100% 19%}
      100%{background-position:0% 82%}
  }

/*teste*/

.marquee {
    height: 1.4em;
    overflow: hidden;
    position: relative;
  }
  
.marquee div {
display: block;
width: 200%;
height: 200px;
position: absolute;
overflow: hidden;
-webkit-animation: marquee 8S linear infinite;
        animation: marquee 8s linear infinite;
}

.marquee span {
width: 30%;
letter-spacing: 2px;
}
  
@-webkit-keyframes marquee {
0% { left: 0; }
100% { left: -100%; }
}

@keyframes marquee {
0% { left: 0; }
100% { left: -100%; }
}

/* Fundo escuro do Modal (Overlay) */
.modal {
    display: none;              /* hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background-color: rgba(0, 0, 0, 0.7);

    /* center modal content */
    display: flex;
    align-items: center;
    justify-content: center;

    /* prevent page scroll while open */
    overflow: auto;
}

/* Caixa de conteúdo do Modal */
.modal-conteudo {
    background-color: #fff;
    padding: 1em 1em;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-family: sans-serif;
    animation: aparecerModal 0.3s ease-out;
    margin: auto;
}

.copiarchave {
    padding: 1em 3em;
    background-color: #1de840;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.copiarchave:hover {
    filter: brightness(0.95);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.copiarchave:active {
    transform: translateY(0) scale(0.98);
    filter: brightness(0.9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.copiarchave:focus-visible {
    outline: 3px solid rgba(33, 150, 243, 0.6);
    outline-offset: 2px;
}



/* Botão de Fechar (o 'X') */
.fechar-modal {
    color: #888;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.fechar-modal:hover,
.fechar-modal:focus {
    color: #000;
    text-decoration: none;
}

/* Imagem do QR Code */
.img-qrcode {
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border: 2px solid #eee;
    border-radius: 8px;
}

footer {
    padding: 1em;
    text-align: center;
    color: var(--text-color);
    background-color: var(--section-bg);
}

/* Animação para o modal surgir suavemente */
@keyframes aparecerModal {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}