/* ===========================
   Cloud Storage - Android Style
   =========================== */

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

:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --ink: #202124;
  --muted: #5f6368;
  --soft: #e8eaed;
  --border: #dadce0;
  
  /* Primary Colors */
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --danger: #ea4335;
  --warning: #fbbc04;
  --success: #34a853;
  --accent: #9334e6;
  
  /* Storage colors */
  --drive: #4285f4;
  --photos: #fbbc04;
  --mail: #ea4335;
  --contacts: #34a853;
  --backup: #9334e6;
  
  --overlay: rgba(32, 33, 36, 0.6);
  --shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

/* Layout */
.gd-body {
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Top Bar */
.gd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.gd-topbar__left {
  width: 48px;
}

.gd-topbar__menu {
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.gd-topbar__menu:hover {
  background: var(--soft);
}

.gd-topbar__center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gd-topbar__logo {
  flex-shrink: 0;
}

.gd-topbar__title {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}

.gd-topbar__right {
  width: 48px;
  display: flex;
  justify-content: flex-end;
}

.gd-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* Main */
.gd-main {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px;
  flex: 1;
}

/* Card */
.gd-card {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Brand Section */
.gd-brand {
  text-align: center;
  padding: 32px 24px 24px;
  background: linear-gradient(180deg, #f1f3f4 0%, #fff 100%);
}

.gd-brand__icon {
  margin-bottom: 16px;
}

.gd-brand__title {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
}

/* Alert */
.gd-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 24px;
  background: #fef7e0;
  border-left: 4px solid var(--warning);
}

.gd-alert__icon {
  flex-shrink: 0;
  color: #b36200;
  margin-top: 2px;
}

.gd-alert__text {
  font-size: 14px;
  line-height: 1.5;
  color: #3c3000;
}

.gd-alert__text strong {
  display: block;
  margin-top: 4px;
}

/* Storage Section */
.gd-storage {
  padding: 24px;
}

.gd-storage__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.gd-storage__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.gd-storage__amount {
  font-size: 12px;
  color: var(--danger);
  font-weight: 500;
}

/* Meter */
.gd-meter {
  height: 8px;
  background: var(--soft);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
}

.gd-meter__seg {
  height: 100%;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gd-meter__seg--drive { background: var(--drive); }
.gd-meter__seg--photos { background: var(--photos); }
.gd-meter__seg--mail { background: var(--mail); }
.gd-meter__seg--other { background: var(--contacts); }
.gd-meter__seg--backup { background: var(--backup); }

/* Breakdown Rows */
.gd-breakdown {
  padding: 0 24px 24px;
}

.gd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--soft);
}

.gd-row:last-child {
  border-bottom: none;
}

.gd-row__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gd-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.gd-row__dot--drive { background: var(--drive); }
.gd-row__dot--photos { background: var(--photos); }
.gd-row__dot--mail { background: var(--mail); }
.gd-row__dot--contacts { background: var(--contacts); }
.gd-row__dot--backup { background: var(--backup); }

.gd-row__icon {
  flex-shrink: 0;
}

.gd-row__label {
  font-size: 14px;
  color: var(--ink);
}

.gd-row__right {
  display: flex;
  align-items: center;
}

.gd-row__spin {
  display: inline-flex;
  color: var(--primary);
}

.gd-row__done {
  display: none;
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

.gd-row--summary {
  justify-content: center;
  padding-top: 16px;
  margin-top: 8px;
}

.gd-row__summary {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--danger);
}

.gd-row__summary svg {
  flex-shrink: 0;
}

/* Spinner Animation */
.gd-spinner {
  animation: gd-spin 1s linear infinite;
}

@keyframes gd-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* CTA Section */
.gd-cta {
  padding: 24px;
  background: #f8f9fa;
  text-align: center;
  border-top: 1px solid var(--soft);
}

.gd-cta__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.gd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gd-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gd-btn:active {
  transform: scale(0.98);
}

/* Footer */
.gd-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 24px 16px;
}

.gd-footer__inner {
  max-width: 600px;
  margin: 0 auto;
}

.gd-footer__inner p {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 12px;
}

.gd-footer__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 0 !important;
}

.gd-footer__link {
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.gd-footer__link:hover {
  text-decoration: underline;
}

.gd-footer__sep {
  color: var(--muted);
}

/* Modal */
.gd-modal__wrap {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.gd-hide {
  display: none !important;
}

.gd-modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gd-modal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 16px;
}

.gd-modal__icon {
  flex-shrink: 0;
}

.gd-modal__headtext {
  flex: 1;
}

.gd-modal__title {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.gd-modal__subtitle {
  font-size: 14px;
  color: var(--muted);
}

.gd-modal__body {
  padding: 0 24px 24px;
}

.gd-modal__body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 12px;
}

.gd-modal__body p:last-child {
  margin-bottom: 0;
}

.gd-modal__foot {
  padding: 16px 24px;
  background: #f8f9fa;
  display: flex;
  justify-content: center;
}

.gd-modal__btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.gd-modal__btn:hover {
  background: var(--primary-hover);
}

/* Animations */
.gd-anim-in {
  animation: gd-pop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gd-pop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Legal Modal Styles */
.gd-modal__body ol {
  padding-left: 20px;
  margin: 16px 0;
}

.gd-modal__body li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 12px;
}

.gd-modal__body ul {
  padding-left: 16px;
  margin-top: 8px;
}

.modeffdate {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Responsive - Android optimized */
@media (max-width: 480px) {
  .gd-body {
    font-size: 14px;
  }
  
  .gd-topbar {
    padding: 6px 12px;
    height: 48px;
  }
  
  .gd-topbar__title {
    font-size: 16px;
  }
  
  .gd-topbar__logo {
    width: 24px;
    height: 24px;
  }
  
  .gd-main {
    padding: 12px 8px;
  }
  
  .gd-card {
    border-radius: 12px;
  }
  
  .gd-brand {
    padding: 20px 16px 16px;
  }
  
  .gd-brand__icon svg {
    width: 56px;
    height: 56px;
  }
  
  .gd-brand__title {
    font-size: 18px;
  }
  
  .gd-alert {
    padding: 12px 14px;
    font-size: 13px;
  }
  
  .gd-alert__text {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .gd-storage {
    padding: 16px 14px;
  }
  
  .gd-storage__header {
    margin-bottom: 10px;
  }
  
  .gd-storage__label {
    font-size: 13px;
  }
  
  .gd-storage__amount {
    font-size: 11px;
  }
  
  .gd-breakdown {
    padding: 0 14px 16px;
  }
  
  .gd-row {
    padding: 10px 0;
  }
  
  .gd-row__label {
    font-size: 13px;
  }
  
  .gd-row__icon {
    width: 18px;
    height: 18px;
  }
  
  .gd-cta {
    padding: 16px 14px 20px;
  }
  
  .gd-cta__text {
    font-size: 13px;
    margin-bottom: 16px;
  }
  
  .gd-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 8px;
  }
  
  .gd-footer {
    padding: 16px 12px;
  }
  
  .gd-footer__inner p {
    font-size: 10px;
    line-height: 1.5;
  }
  
  /* Modal - Android style */
  .gd-modal__wrap {
    padding: 16px;
    align-items: center;
  }
  
  .gd-modal {
    max-width: 100%;
    border-radius: 16px;
  }
  
  .gd-modal__head {
    padding: 20px 20px 12px;
  }
  
  .gd-modal__icon {
    width: 36px;
    height: 36px;
  }
  
  .gd-modal__title {
    font-size: 16px;
  }
  
  .gd-modal__subtitle {
    font-size: 13px;
  }
  
  .gd-modal__body {
    padding: 0 20px 16px;
  }
  
  .gd-modal__body p {
    font-size: 13px;
    line-height: 1.5;
  }
  
  .gd-modal__foot {
    padding: 12px 20px 20px;
  }
  
  .gd-modal__btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .gd-topbar__title {
    font-size: 14px;
  }
  
  .gd-brand__title {
    font-size: 16px;
  }
  
  .gd-alert__text {
    font-size: 12px;
  }
  
  .gd-row__left {
    gap: 8px;
  }
}

