* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #2d3748;
    background-color: white;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 1.5rem;
}

.site-header {
    background: linear-gradient(90deg,  #1d4ed8, #8ca2d2, #072c7b);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a,
.nav-links button {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #0e1b38, #ae7ec8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nav-links a:hover::after {
    transform: scaleX(1);
}

.section {
    padding: 5rem 0;
}

.light-bg {
    background-color: #f7fafc;
}

.test-center {
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}


@media (min-width: 768px) {
    .projects-grid {
      grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: linear-gradient(135deg, #f1f5f9, #ffffff);
    border-radius: 1rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    min-height: auto;
    height: auto;
    display: block;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #2563eb;
    background: linear-gradient(135deg, #ebf4ff, #ffffff);
}

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.project-card p {
    color: #475569;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-card a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: #2563eb;
    color: white;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.project-card a:hover {
    background-color: #1e40af;
    transform: scale(1.05);
}

.contact-form {
    max-width: 400px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e0;
    width: 100%;
    color: black;
    background-color: white;
}

.contact-form button {
   background: linear-gradient(90deg, #2563eb, #1d4ed8);
   color: white;
   padding: 0.75rem 2rem;
   border: none;
   border-radius: 9999px;
   font-size: 1rem;
   font-weight: bold;
   cursor: pointer;
   transition: transform 0.6s ease, box-shadow 0.7s ease;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg,  #1d4ed8, #8ca2d2, #072c7b);
}

.contact-section {
   padding: 4rem 1rem;
   text-align: center;
   background-color: #f7fafc;
   color: black;
}

 body.dark .contact-section {
    background-color: #1e293b;
    color: #edf2f7;
 }

 body.dark .contact-form input,
 body.dark .contact-form textarea {
    background-color: #374151;
    color: #fff;
    border: 1px solid #4b5563;
 }

.site-footer {
    width: 100%;
    background: linear-gradient(90deg, #1d4ed8, #8ca2d2, #072c7b);
    color: white;
    text-align: center;
    padding: 1rem 0;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 2rem;
}

body.dark {
    background-color: #1a202c;
    color: #edf2f7;
}

body.dark .site-header,
body.dark .site-footer {
    background-color: #2d3748;
    color: #edf2f7;
}

body.dark .project-card {
    background: #2d3748;
    color: #edf2f7;
    border-color: #4a5568;
}

body.dark .project-card a {
    background-color: #4c51bf;
}

body.dark .project-card a:hover {
    background-color: #5a67d8;
}

body.dark .contact-form input,
body.dark .contact-form textarea {
  background-color: #4a5568;
  color: white;
  border-color: #718096;
}

body.dark .contact-form button {
  background: linear-gradient(90deg, #5a67d8, #4c51bf);
}

body.dark .contact-form button:hover {
  background: linear-gradient(90deg, #4c51bf, #5a67d8);
}

#darkModeToggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
}

body.dark #about {
  background-color: #2d3748; /* fundal închis pentru secțiunea Despre */
  color: #edf2f7;            /* text deschis */
}

body.dark #about h2 {
  color: #edf2f7;
}

body.dark #about p {
  color: #e2e8f0;
}

body.dark .light-bg {
  background-color: #2d3748;
}

body.dark .project-card h3,
body.dark .project-card p {
  color: #edf2f7; /* text deschis în dark mode */
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color: #e2e8f0; /* alb-gri deschis, foarte lizibil */
  opacity: 1;     /* important! face culoarea complet vizibilă */
}

html {
  scroll-behavior: smooth;
}

.todo-app {
    background-color: #fff;
    color: #000;
    padding: 12px;
    border-radius: 12px;
    transition: background-color 0.3s, color 0.3s;
}

.dark .todo-app {
    background-color: #374151;
    color: #f3f4f6;
}

.todo-app input,
.todo-app button {
    transition: background-color 0.3s, color 0.3s;
}

.dark .todo-app input[type="text"] {
    background-color: #374151;
    color: #f9fafb;
    border: 1px solid #4b5563;
}

.dark .todo-app button {
    background-color: #2563eb;
    color: white;
    border: 1px solid #1d4ed8;
}

.dark .todo-app li {
    background-color: #1f2937;
    color: #f9fafb;
}

.dark .todo-app li.done {
    background-color: #4b5563;
    color: #d1d5db;
    text-decoration: line-through;
}

.dark .todo-app button {
    background-color: #2563eb;
    color: white;
}

.todo-app input {
    padding: 8px;
    width: 65%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.todo-app button {
    padding: 8px 12px;
    margin: 5px 2px;
    border: none;
    background-color: #2563eb;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.todo-app ul {
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.todo-app li {
    background-color: #edf2f7;
    color: #2c2c2c;
    padding: 8px 12px;
    
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.todo-app li.done {
    background: #d4d4d4;
    text-decoration: line-through;
    color: #555;
}

.todo-delete-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
    transition: transform 0.2s;
}

.todo-delete-btn:hover {
    background-color: #dc2626;
}

.filters {
    margin-top: 10px;
}

.filters button {
    background-color: #e5e5e5;
    color: black;
    font-size: 12px;
    padding: 6px 10px;
}

.filters button.active {
    background-color: #2563eb;
    color: white;
}

.counter-app {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

#counterValue {
    font-size: 48px;
    margin: 20px 0;
    font-weight: bold;
}

.counter-buttons button {
    margin: 5px;
    padding: 10px 16px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.counter-buttons button:hover {
    background-color: #1e40af;
}

#counterValue.pulse {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0%  { transform: scale(1); }
    50% { transform: scale(1.2); }
    100%{ transform: scale(1); }
}

.calculator-app {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
}

#calcDisplay {
    width: 100%;
    padding: 10px;
    font-size: 24px;
    margin-bottom: 10;
    text-align: right;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calculator-buttons button {
    padding: 15px;
    font-size: 18px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.calculator-buttons button:hover {
    background-color: #1e40af;
}

.weather-app {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.weather-app input {
    padding: 8px;
    width: 60%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.weather-app button {
    padding: 4px 8px;
    margin-left: 5px;
    background-color: #2563eb;
    color: white;
    border: none;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.weather-app button:hover {
    background-color: #dc2626;
}

#weatherResult {
    margin-top: 20px;
    font-size: 18px;
}

.weather-card {
    background-color: #fff;
    color: #000;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s, color 0.3s;
}

.dark .weather-card {
    background-color: #1f2937;
    color: #f3f4f6;
}

.error-card {
    border-left: 4px solid red;
    font-weight: bold;
}

.dark .error-card {
    background-color: #2d3748;
    color: #f87171;
}

body.dark input,
body.dark textarea,
body.dark select {
    background-color: #2d3748;
    color: #edf2f7;
    border: 1px solid #4a5568;
}

.weather-icon {
    font-size: 1.5rem;
    margin-left: 6px;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#topBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-size: 20px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 12px 16px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

#topBtn.show {
    display: block;
    opacity: 1;
}

#topBtn:hover {
    background-color: #1e40af;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .nav-links {
        flex-direction: column;
        margin-top: 1rem;
    }
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
    .contact-form {
        width: 90%;
    }
}

.convertor-box {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.convertor-box input,
.convertor-box select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.convertor-box button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.convertor-box button:hover {
    background: #dc2626;
}

.convertor-box p {
    flex-basis: 100%;
    margin-top: 10px;
    font-weight: bold;
}

.conversion-history {
    margin-top: 15px;
}

.conversion-card {
    background: #edf2f7;
    padding: 10px;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.currency-delete-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.currency-delete-btn:hover {
    background-color: #dc2626;
}

body.dark #currency-converter {
    background-color: #2d3748;
    color: #edf2f7;
    border: 1px solid #4a5568;
}

body.dark .conversion-card {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border: 1px solid #4a5568;
}

body.dark .convertor-box input,
body.dark .convertor-box select {
    background-color: #1f2937;
    color: #edf2f7;
    border: 1px solid #718096;
}

body.dark .conversion-card {
    background-color: #1f2937;
    border: 1px solid #4a5568;
}

body.dark .project-card{
    background-color: #2d3748;
    color: #edf2f7;
    border: 1px solid #4a5568;
}

body.dark .convertor-box {
    background-color: #2d3748;
    color: #edf2f7;
    border: 1px solid #4a5568;
}

.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shopping-list input {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.shopping-list button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.shopping-list button:hover {
    background-color: #dc2626;
}

.shopping-list li {
    background-color: #edf2f7;
    color: #1e293b;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.dark .shopping-list li {
    background-color: #1f2937;
    color: #f9fafb;
}

.shopping-list li.purchased {
    text-decoration: line-through;
    opacity: 0.6;
}

.shopping-list li button {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.shopping-list li button:hover {
    background-color: #dc2626;
}
