
:root{
  --bg:#071018;
  --panel:#0d1f20;
  --card:#081915;
  --accent:#26f6b0; 
  --accent-2:#7b5cff;
  --muted:#8da3a0;
  --glow:0 8px 30px rgba(38,246,176,0.08);
}
html,body{
  height:100vh;
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:#e6f0ef;

 background: linear-gradient(rgba(4, 16, 20, 0.85), rgba(7, 16, 24, 0.95)),
 url('bg.jpg') no-repeat center center fixed;
 background-size: cover;

}

.wrap{
  max-width:1000px; 
  height: 100vh;
  margin: 0 auto;
  padding: 30px 20px 15px 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px
}
.brand{
  display:flex;
  flex-direction:column
}

.brand h1{
  margin:0;
  font-size:20px
}

.brand p{
  margin:2px 0 0 0;
  color:var(--muted);
  font-size:13px
}

.grid{
  display:grid;
  grid-template-columns:1fr; 
  gap:18px;
  margin-top:18px
}

.catalog{

  background:var(--panel);
  padding:20px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.03)
}
.side{
  background:var(--panel);
  padding:18px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.03)
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}

.card{
  background:linear-gradient(180deg,var(--card),#04221a);
  border-radius:12px;
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  transition:transform 200ms ease, box-shadow 200ms ease;
  border:1px solid rgba(255,255,255,0.03);
  text-decoration:none;
  color:inherit
}

.card:hover{
  transform:translateY(-8px);
  box-shadow:var(--glow);
  outline:1px solid rgba(38,246,176,0.12)
}

.media{
  height:100px; 
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(90deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));
}

.media img.card-photo{
  width:90%;
  height:90px;
  object-fit:contain;
}

.title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px
}

.title h3{
  margin:0;
  font-size:16px
}

.desc{
  color:var(--muted);
  font-size:13px;
  margin:0
}

.cta{
  margin-top:auto;
  display:flex;
  gap:10px
}

.btn-primary{
  flex:1;
  background:linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#031815;
  padding:10px 12px;
  border-radius:10px;
  border: 1px solid var(--accent);
  font-weight:700;
  text-align:center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: 0 0 15px rgba(38, 246, 176, 0.4);
}

.btn-primary:active {
  transform: scale(0.92);
  opacity: 0.8; 
}

.btn-ghost{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--accent);
  color:var(--accent);
  background:transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  text-align: center;
}

.btn-ghost:hover {
  background: rgba(38, 246, 176, 0.15);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(38, 246, 176, 0.2);
}

.btn-ghost:active {
  transform: scale(0.92);
  background: rgba(38, 246, 176, 0.25);
}

/* icon sizing */
.icon{
  width: 200px;
  height: 100px;
}


img.icon[alt="Ludo"] {
  width:96px;
  height:96px
}

.side h4{
  margin:0 0 8px 0
}

.note{
  color:var(--muted);font-size:13px
}

footer{
  margin-top: auto;
  color:var(--muted);
  font-size:13px;
  text-align:center
}

@media(max-width:980px){
  .grid{
    grid-template-columns:1fr;
  }

  .catalog{
    grid-column:auto
  }
  .cards{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:600px){
  .cards{grid-template-columns:1fr}
}
@media(max-width:600px){
  img.icon[alt="Ludo"]{width:80px;height:80px}
}
.media svg.icon {
    width: 120%;
    height: 120%;
}
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #121212;
    margin: 15% auto;
    padding: 20px;
    width: 300px;
    border-radius: 10px;
    border: 1px solid #4ade80;
    color: black;
}

.tutorial-btn {
    background: linear-gradient(to bottom, #334155, #1e293b);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 
        0 6px 0 #0f172a,
       0 10px 15px rgba(0, 0, 0, 0.4);
       transition: all 0.1s ease;      
}
.tutorial-btn:active {
    transform: translateY(6px);
    box-shadow: 
        0 0 0 #0f172a, 
        0 4px 6px rgba(0, 0, 0, 0.4);
}


img.icon[alt="Tic-Tac-Toe"] {
  width: 80%;
  height: 100%;
}


img.icon[alt="Mini Sudoku"] {
  width: 100%;
  height: 100%;
}


img.icon[alt="N Queens"] {
  width: 80%;
  height: 100%;
}


img.icon[alt="Chess "] {
  width: 70%;
  height: 100%;
}


img.icon[alt="Bus Runner"] {
  width: 100%;
  height: 100%;
}


img.icon[alt="Ludo"] {
  width: 200px;
  height: 100px;
}