@font-face {
  font-family: 'Comfortaa';
  src: url('../fonts/Comfortaa-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  background: #F2F2F7;
  font-family: 'Comfortaa', sans-serif;
  color: #1C1C1E;
}

/* === HLAVIČKA === */
.site-header {
  text-align: center;
  padding-top: 24px;
}

/* === LOGO A ANIMACE === */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(50px, 12vw, 100px);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 25px;
}

.logo span {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(10px);
}

@keyframes fadeIn {
  to { opacity: 1; filter: blur(0); transform: none; }
}

@keyframes slideLeft {
  from { opacity: 0; filter: blur(6px); transform: translateX(-25px); }
  to { opacity: 1; filter: blur(0); transform: translateX(0); }
}

@keyframes slideRight {
  from { opacity: 0; filter: blur(6px); transform: translateX(25px); }
  to { opacity: 1; filter: blur(0); transform: translateX(0); }
}

.y { color: #0A84FF; animation: slideRight .8s ease forwards .6s; }
.dot { color: #1C1C1E; animation: fadeIn .8s ease forwards; }
.dotb { color: #0A84FF; animation: fadeIn .8s ease forwards; }
.cz { color: #1C1C1E; animation: slideLeft .8s ease forwards 1.2s; }

/* Stav po načtení (JS přidá třídu loaded) - zastaví animace a zobrazí natvrdo */
body.loaded .logo span {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  animation: none !important;
}

/* === HLAVNÍ KONTEJNER (MAIN) === */
main {
  max-width: 1337px;
  margin: 0 auto 60px;
  background: white;
  border-radius: 10px;
  padding: 12px 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Animace příletu obsahu po načtení */
body.loaded main {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* === AUTENTIZAČNÍ STYLY === */

.page-title {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 300;
  margin: 20px 0 8px 0;
  color: #1C1C1E;
}

.page-subtitle {
  font-size: 14px;
  color: #8E8E93;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Formuláře */
.auth-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #1C1C1E;
  font-size: 14px;
  font-weight: 300;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #D1D1D6;
  border-radius: 8px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 14px;
  background: #FFFFFF;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #0A84FF;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

/* Tlačítka */
.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 15px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  width: 100%;
  background: #0A84FF;
  color: white;
  margin-top: 8px;
}

.btn-primary:hover {
  background: #0070E0;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(10, 132, 255, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #F2F2F7;
  color: #1C1C1E;
  border: 1px solid #D1D1D6;
}

.btn-secondary:hover {
  background: #E5E5EA;
}

/* Upozornění */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.alert-success {
  background: #E5F5EA;
  border-left: 3px solid #34C759;
  color: #1C1C1E;
}

.alert-error {
  background: #FFE5E5;
  border-left: 3px solid #FF3B30;
  color: #1C1C1E;
}

.alert-info {
  background: #E5F2FF;
  border-left: 3px solid #0A84FF;
  color: #1C1C1E;
}

.alert-warning {
  background: #FFF5E5;
  border-left: 3px solid #FF9500;
  color: #1C1C1E;
}

.error-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #FF3B30;
}

.error-list li {
  margin-bottom: 4px;
}

.error-list li:before {
  content: "• ";
  font-weight: bold;
}

/* Odkazy */
.link {
  color: #0A84FF;
  text-decoration: none;
  font-weight: 300;
}

.link:hover {
  text-decoration: underline;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #8E8E93;
}

.text-right {
  text-align: right;
  margin-top: 6px;
}

.text-right .link {
  font-size: 13px;
}

/* Password strength */
.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  background: #E5E5EA;
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 2px;
}

.strength-text {
  display: block;
  font-size: 12px;
  color: #8E8E93;
  margin-top: 4px;
}

/* Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #E5E5EA;
  margin-bottom: 24px;
}

.user-email {
  font-size: 14px;
  color: #8E8E93;
}

.dashboard-card {
  background: #F2F2F7;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.dashboard-card h2 {
  font-size: 18px;
  font-weight: 300;
  margin: 0 0 12px 0;
  color: #1C1C1E;
}

.dashboard-card p {
  color: #8E8E93;
  line-height: 1.6;
  margin: 0 0 10px 0;
  font-size: 14px;
}

.dashboard-card ul {
  margin: 10px 0 0 20px;
  padding: 0;
  color: #8E8E93;
  line-height: 1.6;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 300;
}

.status-verified {
  background: #E5F5EA;
  color: #34C759;
}

.status-unverified {
  background: #FFF5E5;
  color: #FF9500;
}

/* Verify page */
.verify-container {
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
}

.verify-icon {
  font-size: 60px;
  margin-bottom: 20px;
}

.verify-icon.success { color: #34C759; }
.verify-icon.error { color: #FF3B30; }

.verify-title {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 300;
  margin-bottom: 12px;
  color: #1C1C1E;
}

.verify-message {
  color: #8E8E93;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Requirements box */
.requirements {
  background: #F2F2F7;
  border: 1px solid #E5E5EA;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

.requirements h3 {
  font-size: 14px;
  margin: 0 0 10px 0;
  color: #1C1C1E;
  font-weight: 300;
}

.requirements ul {
  margin: 0;
  padding-left: 20px;
  color: #8E8E93;
}

.requirements li {
  margin-bottom: 4px;
}

/* Email info */
.email-display {
  background: #F2F2F7;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #8E8E93;
}

.email-display strong {
  color: #1C1C1E;
}

/* Cloudflare Turnstile */
.cf-turnstile {
  margin: 16px 0;
}

/* Responsive */
@media (max-width: 768px) {
  main {
    margin: 0 12px 40px;
    padding: 12px 16px;
  }
  
  .dashboard-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .auth-form {
    padding: 0;
  }
}
/* === APLIKACE V DASHBOARDU === */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* OPRAVA 3: Responsive - Tablet */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bmac-widget {
        left: 15px !important;
        bottom: 15px !important;
    }
    
    .bmac-image {
        width: 150px !important;
        max-width: 150px !important;
    }
}

/* OPRAVA 4: Responsive - Mobil */
@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .bmac-widget {
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 10px !important;
    }
    
    .bmac-widget:hover {
        transform: translateX(-50%) translateY(-5px) !important;
    }
    
    .bmac-image {
        width: 140px !important;
        max-width: 140px !important;
    }
}

/* OPRAVA 5: Responsive - Mobil malý */
@media (max-width: 480px) {
    .bmac-image {
        width: 120px !important;
        max-width: 120px !important;
    }
}

/* OPRAVA 6: Account management grid */
.account-management-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

@media (max-width: 1400px) {
    .account-management-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .account-management-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .account-management-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .account-management-grid {
        grid-template-columns: 1fr;
    }
}


.app-card {
  background: #F2F2F7;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: #0A84FF;
}

/* Aplikace již použitá - barevná */
.app-card.app-used {
  background: linear-gradient(135deg, #E5F2FF 0%, #F2F2F7 100%);
}

.app-card.app-used .app-icon img {
  filter: none;
  opacity: 1;
}

/* Aplikace nepoužitá - zašedlá */
.app-card.app-unused {
  background: #F2F2F7;
}

.app-card.app-unused .app-icon img {
  filter: grayscale(100%);
  opacity: 0.4;
}

.app-card.app-unused:hover .app-icon img {
  filter: grayscale(50%);
  opacity: 0.7;
}

.app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}

.app-icon img {
  max-width: 64px;
  max-height: 64px;
  transition: all 0.3s ease;
}

.app-icon-placeholder {
  font-size: 48px;
  opacity: 0.3;
}

.app-info {
  flex: 1;
}

.app-name {
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 8px 0;
  color: #1C1C1E;
}

.app-description {
  font-size: 13px;
  color: #8E8E93;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.app-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-stat {
  font-size: 12px;
  color: #34C759;
  font-weight: 400;
}

.app-stat-date {
  font-size: 11px;
  color: #8E8E93;
}

.app-new {
  margin-top: 8px;
}

.badge-new {
  display: inline-block;
  padding: 4px 10px;
  background: #0A84FF;
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.account-management-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* Responsive breakpointy... */
@media (max-width: 1400px) {
    .account-management-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .account-management-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .account-management-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .account-management-grid {
        grid-template-columns: 1fr;
    }
}

/* Grid pro správu účtu (dashboard) */
.account-management-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

@media (max-width: 1400px) {
    .account-management-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .account-management-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .account-management-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .account-management-grid {
        grid-template-columns: 1fr;
    }
}
