html, body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f5f6fa;
  font-family: 'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
.container {
  flex: 1 0 auto;
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px 24px;
    max-width: 350px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

.card + .card {
    margin-top: 32px;
}

.logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: #222;
}

.input-group {
    width: 100%;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #555;
}

.input-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
}

button#calc-btn {
    width: 100%;
    padding: 12px 0;
    background: #4f8cff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 18px;
    transition: background 0.2s;
}

button#calc-btn:hover {
    background: #357ae8;
}

.result {
    width: 100%;
    min-height: 32px;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    margin-top: 8px;
}

.lang-select-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
#lang-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 1rem;
    background: #f5f6fa;
    color: #333;
}

.site-header {
    width: 100%;
    max-width: 350px;
    margin: 32px auto 32px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.site-header .logo {
    margin-bottom: 10px;
}
#main-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
    text-align: center;
}
.site-header .lang-select-wrapper {
    width: 100%;
    justify-content: center;
    margin-bottom: 0;
}

.site-footer {
  flex-shrink: 0;
  width: 100vw;
  text-align: center;
  font-size: 1em;
  color: #fff;
  background: #23272f;
  padding: 22px 0 16px 0;
  margin-top: 40px;
  border-top: none;
  letter-spacing: 0.02em;
  position: relative;
}
.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.site-footer .footer-links a {
  color: #fff;
  text-decoration: underline;
  margin-left: 12px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-footer .footer-links a:hover {
  color: #4f8cff;
}

/* RTL支持 */
html[dir="rtl"] body, html[dir="rtl"] .container, html[dir="rtl"] .card {
    direction: rtl;
}
html[dir="rtl"] .input-group label, html[dir="rtl"] .result, html[dir="rtl"] h1 {
    text-align: right;
}
html[dir="rtl"] .lang-select-wrapper {
    justify-content: flex-start;
}

@media (max-width: 480px) {
    .card {
        padding: 18px 6px;
        max-width: 98vw;
    }
    h1 {
        font-size: 1.2rem;
    }
    .logo {
        width: 48px;
        height: 48px;
    }
    .card + .card {
        margin-top: 18px;
    }
    .site-header {
        max-width: 98vw;
        margin-bottom: 18px;
        margin-top: 18px;
    }
    #main-title {
        font-size: 1rem;
    }
} 