/* ==========================================================================
   1. VARIABLES & NORD THEME
   ========================================================================== */
:root {
  --color-theme: #5E81AC;
  --bg-primary: #2E3440;
  --bg-secondary: rgba(59,66,82,.5);
  --bg-hover: rgba(41,120,173,.5);
  --color-primary: #D8DEE9;
  --color-secondary: #81A1C1;
  --color-white: #ECEFF4;
  --padding: 1rem;
  --rounded: 0.25rem;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.12);
}

/* ==========================================================================
   2. BASE RESET & DEFAULTS
   ========================================================================== */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: "Open Sans", sans-serif;
  transition: background-color .3s, color .3s;
}

body {
  color: var(--color-primary);
  background: var(--bg-primary) no-repeat fixed center;
  background-size: cover;
  min-height: 100vh;
}

a, a:visited {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-white);
}

/* ==========================================================================
   3. CLOCK WIDGET (time.is)
   ========================================================================== */
#clock {
    margin-top: 0px;
    margin-bottom: 0px;
    text-align: center;
    width: 100%;
}

#clock h1 {
    font-size: 72px !important;  /* was 82px */
    font-weight: 700;
    color: var(--color-white) !important;
    margin-bottom: 0;
    line-height: 1.1;
}

#clock h2 {
    font-size: 20px !important;  /* was 26px */
    font-weight: 400;
    color: var(--color-white) !important;
    margin-top: 2px;
}

/* ==========================================================================
   4. LAYOUT CONTAINERS
   ========================================================================== */
#container {
  margin: 0 auto;
  padding-top: 0em;
  width: 70%;
  animation: fadein .3s;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#apps {
  padding: var(--padding);
  margin: 1em 0 3em;
  background-color: rgba(19, 19, 19, 0.3);
  border-radius: var(--rounded);
}

/* ==========================================================================
   5. APPS GRID & ITEMS
   ========================================================================== */
#apps-loop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.apps-item {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 1em;
  background: var(--bg-secondary);
  border-radius: var(--rounded);
  box-shadow: var(--shadow);
}

.apps-item:hover {
  background-color: var(--bg-hover) !important;
}

.apps-icon {
  font-size: 2.5em;
  margin-right: 0.5em;
  display: flex;
  align-items: center;
  color: var(--color-primary);
}

.apps-text {
  display: flex;
  flex-direction: column;
}

.apps-text span:first-child {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-primary);
}

.apps-text span:last-child {
  color: var(--color-secondary) !important;
  font-size: 0.8rem;
  text-transform: lowercase;
}

/* ==========================================================================
   6. BOOKS GRID & ITEMS
   ========================================================================== */
#books-loop {
  display: grid;
  grid-column-gap: 15px;
  grid-row-gap: 15px;
  grid-template-columns: 1fr 1fr 1fr;
/*  grid-template-rows: 94px; padding med prvim pa drugim rowom */
}

#books-loop a {
  text-decoration: none;
  color: var(--color-primary);
}
#books-loop a:hover {
  color: var(--color-white);
}

/* ==========================================================================
   7. PLEX GRID & ITEMS
   ========================================================================== */
#plex-loop {
  display: grid;
  grid-column-gap: 15px;
  grid-row-gap: 15px;
  grid-template-columns: 1fr 1fr;
/*  grid-template-rows: 94px; padding med prvim pa drugim rowom */
}

#plex-loop a {
  text-decoration: none;
  color: var(--color-primary);
}
#plex-loop a:hover {
  color: var(--color-white);
}

/* ==========================================================================
   8. MODALS & UI ELEMENTS
   ========================================================================== */
#modal_init a {
    bottom: 2vh;
    left: 1vw;
    position: fixed;
    color: var(--color-primary);
    
    /* New styles to make it bigger */
    font-size: 2.5rem; /* Adjust this number to make it even larger */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, color 0.3s;
}

#modal_init a:hover {
    color: var(--color-secondary);
    transform: scale(1.1); /* Slightly grows when you hover over it */
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS (MOBILE & MAX COLUMNS)
   ========================================================================== */

/* This prevents the site from expanding beyond 4 columns on high resolutions */
@media screen and (min-width: 1131px) {
  #apps-loop {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 1130px) {
  #container {
    width: 90%;
  }
}

@media screen and (max-width: 880px) {
  #apps-loop {
    grid-template-columns: 1fr 1fr 1fr; /* Forces 3 columns */
  }
}

@media screen and (max-width: 666px) {
  #apps-loop {
    grid-template-columns: 1fr 1fr; /* Forces 2 columns */
    gap: 10px; /* Optional: tightens gap for small screens */
  }
}