/**
 * Poker Calculator V2 - Application Layout & Base Styles
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(212, 175, 55, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(12, 32, 23, 0.3) 0%, transparent 70%);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 20px;
  color: var(--gold-primary);
  line-height: 1;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* App Main Content Area */
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 16px 24px 88px 24px; /* 88px bottom padding prevents footer collision (56px footer + 32px safe gap) */
  position: relative;
}

/* Landing View */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
  text-align: center;
  padding: 32px 16px;
}

.landing-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.landing-symbol {
  font-size: 48px;
  color: var(--gold-primary);
  line-height: 1;
  text-shadow: 0 0 16px var(--gold-glow);
}

.landing-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.landing-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 440px;
}

/* Dashboard View */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 1024px) {
  .dashboard-grid-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
  }
}

/* Fixed Footer Placeholder */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background-color: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  z-index: 90;
}

.footer-placeholder-text {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Settings Drawer */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.settings-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background-color: var(--bg-panel);
  border-left: 1px solid var(--border-card);
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.7);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.settings-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-light);
}

.drawer-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
