* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-red: #ff0000;
  --dark-red: #cc0000;
  --black: #0a0a0a;
  --dark-gray: #1a1a1a;
  --light-gray: #2a2a2a;
  --text-white: #ffffff;
  --text-gray: #cccccc;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: #1a1a1a;
  padding: 0.6rem 0;
  border-bottom: 2px solid #ff0000;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 50px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 1.8rem;
  font-weight: bold;
  color: #ff0000;
  text-decoration: none;
  letter-spacing: 2px;
  padding: 0.3rem 0;
  position: absolute;
  left: 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: absolute;
  right: 0;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
}

.mobile-menu-overlay.active {
  display: block;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.nav-links a:hover {
  color: #ff0000;
}

.btn-login, .btn-logout {
  background: #ff0000;
  padding: 0.4rem 1.2rem;
  border-radius: 5px;
  transition: background 0.3s;
  font-size: 0.95rem;
}

.btn-login:hover, .btn-logout:hover {
  background: #cc0000;
  color: #ffffff !important;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  padding: 6rem 0;
  text-align: center;
  border-bottom: 3px solid #ff0000;
  min-height: 400px;
}

.hero h1 {
  font-size: 4rem;
  color: #ff0000;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.hero p {
  font-size: 1.5rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Buttons */
.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
  font-weight: 600;
}

.btn-primary {
  background: #ff0000;
  color: #ffffff;
}

.btn-primary:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

.btn-secondary {
  background: transparent;
  color: #ff0000;
  border: 2px solid #ff0000;
}

.btn-secondary:hover {
  background: #ff0000;
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

/* Plugins Section */
.plugins-section, .plugins-page {
  padding: 4rem 0;
  min-height: calc(100vh - 300px);
}

.plugins-section h2, .plugins-page h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #ff0000;
}

.plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.plugin-card {
  background: var(--dark-gray);
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.plugin-card:hover {
  border-color: #ff0000;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.plugin-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.plugin-card h3 {
  color: var(--text-white);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.plugin-card p {
  color: var(--text-gray);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.plugin-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-gray);
}

.plugin-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--light-gray);
}

.price {
  font-weight: bold;
  font-size: 1.1rem;
}

.price.free {
  color: #00ff00;
}

.price.paid {
  color: #ff0000;
}

.btn-view {
  background: #ff0000;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.btn-view:hover {
  background: #cc0000;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  background: #1a1a1a;
  border-radius: 10px;
  margin: 2rem 0;
}

.empty-state p {
  font-size: 1.1rem;
  color: #cccccc;
  margin: 1rem 0;
}

.empty-state a {
  color: #ff0000;
  text-decoration: none;
  font-weight: 600;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Plugin Detail */
.plugin-detail {
  padding: 4rem 0;
}

.plugin-header {
  display: flex;
  gap: 2rem;
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 10px;
  border: 2px solid #ff0000;
}

.plugin-icon-large {
  font-size: 6rem;
}

.plugin-info-header h1 {
  color: #ff0000;
  margin-bottom: 1rem;
}

.plugin-description {
  color: var(--text-gray);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.plugin-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-gray);
}

/* Login */
.login-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-box {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 10px;
  border: 2px solid #ff0000;
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  color: #ff0000;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.8rem;
  background: var(--light-gray);
  border: 1px solid var(--light-gray);
  border-radius: 5px;
  color: var(--text-white);
  font-size: 1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #ff0000;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group small {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-gray);
  font-size: 0.85rem;
}

.error-message {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid #ff0000;
  color: #ff0000;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

/* Admin Dashboard */
.admin-dashboard {
  padding: 4rem 0;
}

.admin-dashboard h1 {
  color: #ff0000;
  margin-bottom: 0.5rem;
}

.admin-dashboard > .container > p {
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.admin-section {
  background: var(--dark-gray);
  padding: 2rem;
  border-radius: 10px;
  border: 2px solid var(--light-gray);
  margin-bottom: 2rem;
}

.admin-section h2 {
  color: #ff0000;
  margin-bottom: 1.5rem;
}

.admin-form {
  max-width: 500px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th, .users-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

.users-table th {
  color: #ff0000;
  font-weight: 600;
}

.users-table td {
  color: var(--text-gray);
}

.btn-delete {
  background: #ff0000;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-delete:hover {
  background: #cc0000;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Footer */
footer {
  background: #1a1a1a;
  padding: 2rem 0;
  text-align: center;
  border-top: 2px solid #ff0000;
  margin-top: auto;
  width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

footer p {
  color: var(--text-gray);
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
    z-index: 1001;
    position: absolute;
    right: 0;
  }

  .navbar .container {
    flex-wrap: nowrap;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #1a1a1a;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    border-left: 2px solid #ff0000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a,
  .btn-login,
  .btn-logout {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8rem;
  }

  .language-selector {
    width: 100%;
    margin-left: 0;
  }

  .language-select {
    width: 100%;
  }

  .logo {
    font-size: 1.3rem;
  }

  .logo img {
    height: 30px;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo img {
    height: 35px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .nav-links li {
    margin: 0;
  }

  .language-selector {
    margin-left: 0;
    width: 100%;
  }

  .language-select {
    width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .plugins-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .plugin-header {
    flex-direction: column;
    text-align: center;
  }

  .plugin-icon-large img {
    width: 80px;
    height: 80px;
  }

  .plugin-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .admin-section {
    padding: 1rem;
  }

  .admin-form {
    max-width: 100%;
  }

  .users-table {
    font-size: 0.85rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .users-table thead,
  .users-table tbody,
  .users-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .users-table th,
  .users-table td {
    padding: 0.5rem 0.3rem;
    font-size: 0.75rem;
  }

  .btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .admin-dashboard h1 {
    font-size: 1.5rem;
  }

  .admin-dashboard h2 {
    font-size: 1.2rem;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 0.9rem;
  }

  .form-actions,
  .admin-form > div[style*="display: flex"] {
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-actions .btn,
  .admin-form .btn {
    width: 100%;
  }

  .admin-section table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-section table thead,
  .admin-section table tbody,
  .admin-section table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  .wiki-admin-plugin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .wiki-admin-actions {
    width: 100%;
    flex-direction: column;
  }

  .wiki-admin-actions .btn {
    width: 100%;
  }

  .wiki-sections-table {
    font-size: 0.8rem;
    display: block;
    overflow-x: auto;
  }

  .container {
    padding: 0 15px;
  }

  .login-box {
    padding: 1.5rem;
  }

  footer {
    font-size: 0.85rem;
  }
}

/* Tunnel Status */
.tunnel-active {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #00ff00;
  padding: 1rem;
  border-radius: 5px;
}

.tunnel-inactive {
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid #ffa500;
  padding: 1rem;
  border-radius: 5px;
}

.tunnel-url {
  color: #ff0000;
  font-weight: bold;
  text-decoration: none;
  word-break: break-all;
}

.tunnel-url:hover {
  text-decoration: underline;
}

.tunnel-active code,
.tunnel-inactive code {
  background: var(--light-gray);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}


/* Plugin Icon Images */
.plugin-icon img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.plugin-icon-large img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
}


/* Language Selector - Vermelho igual ao botão Login */
.language-selector {
  margin-left: 1rem;
}

.language-select {
  background: #ff0000;
  color: #ffffff;
  border: none;
  padding: 0.5rem 2.5rem 0.5rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s;
  appearance: none;
  min-width: 150px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.language-select:hover {
  background: #cc0000;
}

.language-select:focus {
  outline: none;
}

.language-select option {
  background: #1a1a1a;
  color: #ffffff;
  padding: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .language-selector {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }
  
  .language-select {
    width: 100%;
  }
}


/* Success/Error Messages */
.success-message {
  background: rgba(0, 255, 0, 0.1);
  border: 2px solid #00ff00;
  color: #00ff00;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  animation: slideIn 0.3s ease-out;
}

.error-message {
  background: rgba(255, 0, 0, 0.1);
  border: 2px solid #ff0000;
  color: #ff0000;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
