* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* header */
header {
  background: var(--card-bg);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100px;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 600;
}

h2 {
  margin-bottom: 5px;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
}

/* main layout */
.main-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  flex: 1;
  align-items: stretch;
  padding: 2rem;
  color: var(--text-main);
  max-width: 1200px;
  margin: 20px auto;
  width: 100%;
}

/* layout article */
.main-layout article {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--card-bg);
  padding: 2.5rem;
  box-shadow: 0 4px 15px var(--shadow-color);
  justify-content: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* layout aside */
.main-layout aside {
  flex: 1;
  min-width: 300px;
  border-radius: 12px;
  background: var(--card-bg);
  padding: 2.5rem;
  box-shadow: 0 4px 15px var(--shadow-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Style de op- en aftel buttons */
#teller, #counter {
  color: var(--text-main);
  font-size: 75px;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 4px 10px var(--shadow-color);
  margin-top: 1rem;
}

#optel-aftel {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

button {
  background-color: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 15px;
  min-width: 90px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px var(--shadow-hover);
}

button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--shadow-hover);
}

.controls-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

/* footer */
footer {
  width: 100%;
  background-color: var(--footer-bg);
  color: var(--text-muted);
  text-align: center;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  transition: background-color 0.3s ease;
}

/* Calculator Styles */
.calc-display {
    width: 100%;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 2rem;
    text-align: right;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow-x: auto;
    box-shadow: inset 0 2px 4px var(--shadow-color);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.calc-grid button {
    min-width: unset;
    padding: 12px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.calc-grid .op-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--accent);
}

.calc-grid .op-btn:hover {
    background-color: var(--accent);
    color: #fff;
}

.calc-grid .clear-btn {
    background-color: #ef4444;
}

.calc-grid .clear-btn:hover {
    background-color: #dc2626;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .main-layout {
    padding: 1rem;
    flex-direction: column;
  }
  
  .calc-grid {
    gap: 5px;
  }

  header h1 {
    font-size: 1.8rem;
  }
}