:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #ecf0f1;
    --bg-color: #1a1a1a;
    --card-color: #2c3e50;
    --nav-bg: rgba(44, 62, 80, 0.9);
}

:root.light-theme {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --bg-color: #ecf0f1;
    --card-color: #ffffff;
    --nav-bg: rgba(236, 240, 241, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Rainbow effect for theme switch */
/* Rainbow theme styles */
body.rainbow-theme {
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { background: linear-gradient(45deg, #ff0000, #ff7e00, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000); }
    100% { background: linear-gradient(45deg, #ff7e00, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000, #ff7e00); }
}

/* Text glow effect for rainbow theme */
body.rainbow-theme h1, body.rainbow-theme h2 {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(255, 255, 255, 0.8); }
    to { text-shadow: 0 0 20px rgba(255, 255, 255, 1); }
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

header {
    position: relative;
    margin: 0;
    padding: 20px 0;
    text-align: center;
}

@media (max-width: 768px) {
    header {
        position: relative;
        padding: 10px 20px;
    }

    .hamburger {
        position: absolute;
        top: 10px;
        right: 20px;
        z-index: 1001;
    }

    .mobile-nav {
        padding-top: 60px;
    }
}

.theme-switch-container {
    display: flex;
    align-items: center;
}

.theme-label {
    margin-left: 10px;
    font-size: 14px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.hamburger {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--nav-bg);
    z-index: 1000;
    transition: right 0.3s ease;
    padding-top: 60px;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 20px;
}

.mobile-nav li {
    margin-bottom: 20px;
}

.mobile-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.mobile-nav a:hover {
    background-color: var(--secondary-color);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.kayak-icon {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.header-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-text h1, .header-text p {
    font-size: 2em;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: 1px;
    margin: 10px 0;
    line-height: 1.2;
    display: block;
}

h1 {
    font-size: 2em;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

h2 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.2em;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-style: italic;
}

.countdown-container {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.countdown {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin: 20px 0;
}

.countdown-item {
    flex: 1;
}

.countdown-item span {
    display: block;
}

.countdown-item span:first-child {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
}

.countdown-label {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
}

.departure-time {
    text-align: center;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
    padding: 10px;
}

.team-member {
    background-color: var(--card-color);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.member-photo {
    width: 100%;
    height: 150px;
    background-color: #555;
    border-radius: 5px;
    margin-bottom: 5px;
    overflow: hidden;
    flex: 1;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.member-info {
    text-align: center;
    padding: 5px 0;
}

.member-name {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.member-nickname {
    margin: 0;
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.placeholder-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 14px;
}

.excel-container {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.excel-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.excel-link:hover {
    background-color: var(--primary-color);
}

.tshirt-container {
    background-color: var(--card-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.tshirt-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    display: block;
}

/* Rainbow animation */
@keyframes rainbow {
    0% { background-color: #ff0000; }
    14% { background-color: #ff7f00; }
    28% { background-color: #ffff00; }
    42% { background-color: #00ff00; }
    57% { background-color: #0000ff; }
    71% { background-color: #4b0082; }
    85% { background-color: #9400d3; }
    100% { background-color: #ff0000; }
}

.rainbow-mode {
    animation: rainbow 2s linear infinite;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .mobile-nav {
        width: 40%;
    }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 10px 2px #00d1b2;
    filter: drop-shadow(0 0 6px #00d1b2);
  }
  50% {
    box-shadow: 0 0 20px 5px #00ffe0;
    filter: drop-shadow(0 0 10px #00ffe0);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 10px 2px #00d1b2;
    filter: drop-shadow(0 0 6px #00d1b2);
  }
}

.ball.spinning {
  animation: spin 2s linear infinite;
  /* Jeigu reikia, galima pridėti transition */
}

@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');

#outh {
  max-width: 650px;
  margin: 60px auto;
  background: #fdf6e3 url('/assets/images/paper.jpg') repeat; /* subtle crumpled paper */
  padding: 40px 50px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  font-family: 'Special Elite', monospace;
  color: #5b4636;
  line-height: 1.6;
  position: relative;
  user-select: none;
}

/* Header with typewriter icon */
#outh .header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  gap: 12px;
}

#outh .header i.fa-typewriter {
  font-size: 2rem;
  color: #8b6c4d;
  filter: drop-shadow(1px 1px 1px #cbb292);
}

/* Title style */
#outh h2 {
  font-size: 2.4rem;
  margin: 0;
  letter-spacing: 1.1px;
  text-shadow: 1px 1px 0 #000000;
}

/* Text paragraphs */
.outh-text p {
  font-size: 1.55rem;
  font-weight: 400;
  margin: 18px 0;
  white-space: pre-line;
  overflow: hidden;
  border-right: .15em solid #5b4636; /* cursor */
  animation: typing 1.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Animate lines typing sequentially with delay 
.outh-text p:nth-child(1) {
  animation-delay: 0s, 3.5s;
}
.outh-text p:nth-child(2) {
  animation-delay: 3.7s, 7.2s;
}
.outh-text p:nth-child(3) {
  animation-delay: 7.4s, 10.9s;
}
.outh-text p:nth-child(4) {
  animation-delay: 11.1s, 14.6s;
}
*/
/* Typing animation */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* Cursor blinking */
@keyframes blink-caret {
  0%, 100% { border-color: transparent }
  50% { border-color: #5b4636 }
}

/* Footer */
small {
  display: block;
  margin-top: 40px;
  font-style: italic;
  text-align: right;
  color: #8a7a62;
  user-select: none;
}

/* Responsive */
@media (max-width: 600px) {
  #outh {
    padding: 30px 20px;
    max-width: 90vw;
  }
  #outh h2 {
    font-size: 1.8rem;
  }
  .outh-text p {
    font-size: 1.6rem;
  }
}

iframe {
    width: 60%;
    height: 80vh;
    display: block;
    border: none;
    max-width: 100%;
    /* For dynamic height, you may need JS, but this ensures it doesn't overflow */
}

/* styles.css */
#whos-who {
  gap: 24px;
  max-width: 680px;
  margin: 40px auto;
  font-family: Arial, sans-serif;
  color: #02221d;
  justify-content: center;
}

.card {
  border: 1px solid #09ffda;
  border-radius: 8px;
  padding: 16px;
  width: 300px;
  height: 400px;
  text-align: center;
}

.card h2 {
  color: #09ffda;
  margin-bottom: 16px;
}

button {
  padding: 12px 24px;
  font-weight: 700;
  font-size: 1rem;
  background: #09ffda;
  border: none;
  border-radius: 6px;
  color: #02221d;
  cursor: pointer;
  width: 100%;
}

#resultBaran, #resultRoller {
  margin-top: 20px;
  min-height: 180px;
  font-weight: 700;
  font-size: 1.4rem;
  color: #4eff08;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
