:root {
    --bg-color: #1f1f3a;
    --text-color: #ffffff;
    --link-bg: rgba(255, 255, 255, 0.1);
    --link-hover: rgba(255, 255, 255, 0.2);
}

body.light {
    --bg-color: #edfcfc;
    --text-color: #1f1f3a;
    --link-bg: rgba(0, 0, 0, 0.05);
    --link-hover: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
}

body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

textarea {
  width: 100%;
  max-width: 600px;
  min-height: 150px;
  padding: 1rem;
  font-size: 1rem;
  font-family: 'Segoe UI', sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s, color 0.3s;
}

textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

textarea:focus {
  border-color: #007acc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.4);
  background-color: var(--bg-color);
  color: var(--text-color);
}


.container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.top {
    height: 30vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 20px;
    z-index: 1;
    flex-shrink: 0;
    position: relative;
}

.bottom {
    height: 70vh;
    overflow-y: auto;
    padding: 20px;
    z-index: 0;
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
    }

    .top {
        width: 40%;
        height: 100vh;
        padding: 60px 20px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .bottom {
        width: 60%;
        height: 100vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
    }

    .links {
        width: 100%;
    }
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--text-color);
    object-fit: cover;
    margin-bottom: 10px;
}

.title-rainbow {
    font-size: 30px;
    font-weight: bold;
    animation: rainbow 8s linear infinite;
}

form {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      max-width: 600px;
    }

    input, textarea {
      padding: 1rem;
      font-size: 1rem;
      font-family: 'Segoe UI', sans-serif;
      border: 1px solid #ccc;
      border-radius: 8px;
      resize: vertical;
      transition: border-color 0.3s, box-shadow 0.3s;
    }

    input:focus, textarea:focus {
      border-color: #007acc;
      outline: none;
      box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.2);
    }

    button[type="submit"] {
      padding: 1rem;
      font-size: 1.1em;
      border: none;
      border-radius: 8px;
      background: var(--link-bg);
      color: var(--text-color);
      cursor: pointer;
      transition: background 0.3s;
    }

    button[type="submit"]:hover {
      background: var(--link-hover);
    }


@keyframes rainbow {
    0% {
        color: hsl(0, 100%, 85%);
    }

    16% {
        color: hsl(40, 100%, 85%);
    }

    33% {
        color: hsl(60, 100%, 85%);
    }

    50% {
        color: hsl(120, 100%, 85%);
    }

    66% {
        color: hsl(200, 100%, 85%);
    }

    83% {
        color: hsl(280, 100%, 85%);
    }

    100% {
        color: hsl(0, 100%, 85%);
    }
}

h1 {
    font-size: 1.8em;
    margin: 10px 0 5px;
    text-align: center;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}

.link-btn {
    background: var(--link-bg);
    color: var(--text-color);
    border: 1px solid transparent;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.1em;
    text-align: center;
    transition: background 0.3s, opacity 0.2s ease-out;
}

.link-btn:hover {
    background: var(--link-hover);
}

footer {
    text-align: center;
    font-size: 0.8em;
    color: #aaa;
    padding: 10px;
    margin-top: 20px;
}

footer p {
  font-weight: normal;
  font-size: 0.5em;
}

@media (min-width: 768px) {
    footer {
        margin-top: 50px;
    }
}

#theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s;
}

#theme-toggle:hover {
    opacity: 0.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-btn.appear {
    animation: fadeInUp 0.6s ease-out forwards;
}