:root {
    --primary-color: #f5f7fa;
    --shadow-light: #ffffff;
    --shadow-dark: #e0e0e0;
    --text-color: #2d3436;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #e0e5ec;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
  }
  
  .container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  header {
    text-align: center;
    margin-bottom: 2em;
}

h1 {
    text-align: center;
    margin-bottom: 0.5em;
    color: #2d3436;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 2px 2px 3px rgba(255,255,255,0.5);
}

h1 i {
    margin-right: 0.5em;
    color: #4b7bec;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

form {
    background: #e0e5ec;
    padding: 2em;
    border-radius: 16px;
    box-shadow: 
      9px 9px 16px rgba(163, 177, 198, 0.6),
      -9px -9px 16px rgba(255, 255, 255, 0.5);
    max-width: 500px;
    margin: auto;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5em;
    animation: fadeIn 0.5s ease forwards;
}

label {
    display: block;
    font-weight: 500;
    color: #2d3436;
    margin-top: 20px;
}

label i {
    margin-right: 0.5em;
    color: #4b7bec;
}

input, select {
    width: 100%;
    padding: 0.8em;
    margin-top: 0.5em;
    border-radius: 10px;
    border: none;
    background: #e0e5ec;
    box-shadow: 
      inset 5px 5px 10px rgba(163, 177, 198, 0.6),
      inset -5px -5px 10px rgba(255, 255, 255, 0.5);
    color: #2d3436;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* セレクトボックスのスタイル */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%234b7bec' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    padding-right: 2.5em;
}

/* 日付と時間の入力フィールド用のスタイル */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.5em;
    position: relative;
}

input[type="date"] {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%234b7bec' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
}

input[type="time"] {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%234b7bec' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
}

/* ブラウザのデフォルトカレンダーアイコンを非表示にする */
input::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 2em;
    height: 2em;
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 1;
}

input:focus, select:focus {
    outline: none;
    box-shadow: 
      inset 3px 3px 6px rgba(163, 177, 198, 0.6),
      inset -3px -3px 6px rgba(255, 255, 255, 0.5);
}

.extra-fields {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid rgba(163, 177, 198, 0.3);
}

button {
    width: 100%;
    padding: 1em;
    margin-top: 1em;
    background: #e0e5ec;
    color: #2d3436;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 
      7px 7px 14px rgba(163, 177, 198, 0.6),
      -7px -7px 14px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

button i {
    margin-right: 0.5em;
    color: #4b7bec;
}

button:hover {
    box-shadow: 
      5px 5px 10px rgba(163, 177, 198, 0.6),
      -5px -5px 10px rgba(255, 255, 255, 0.5);
    transform: translateY(2px);
}

button:active {
    box-shadow: 
      inset 5px 5px 10px rgba(163, 177, 198, 0.6),
      inset -5px -5px 10px rgba(255, 255, 255, 0.5);
}

#result {
    margin-top: 2em;
    text-align: center;
    padding: 1em;
    border-radius: 10px;
    background: #e0e5ec;
    box-shadow: 
      7px 7px 14px rgba(163, 177, 198, 0.6),
      -7px -7px 14px rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 500px;
    transition: opacity 0.3s ease;
}

#result.success {
    background: #e6f7e9;
    color: #2ecc71;
}

#result.error {
    background: #ffeeee;
    color: #e74c3c;
}

#result i {
    font-size: 1.2em;
    margin-right: 0.5em;
}

/* ローディングオーバーレイ */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(224, 229, 236, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    background: #e0e5ec;
    padding: 2em;
    border-radius: 50%;
    box-shadow: 
      9px 9px 16px rgba(163, 177, 198, 0.6),
      -9px -9px 16px rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner i {
    font-size: 2em;
    color: #4b7bec;
}

/* アニメーション効果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* レスポンシブデザイン */
@media (max-width: 600px) {
    body {
        padding: 1em;
    }
    
    form {
        padding: 1.5em;
    }
    
    h1 {
        font-size: 1.5em;
    }
}

textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    box-shadow: 
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    color: var(--text-color);
    font-size: 1em;
    resize: none;
    min-height: 100px;
    max-height: 300px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    overflow-y: auto;
}

.type-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 0.5em;
}

.type-btn {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: var(--text-color);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    border: 2px solid transparent;
}

.type-btn[data-type^="休憩"] {
    background: #f0f4ff;
}

.type-btn:hover {
    box-shadow: 
        2px 2px 4px var(--shadow-dark),
        -2px -2px 4px var(--shadow-light);
    transform: translateY(1px);
}

.type-btn.active {
    background: #4b7bec;
    color: white;
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.2),
        inset -3px -3px 6px rgba(255, 255, 255, 0.1);
    transform: translateY(2px);
    border: 2px solid white;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .type-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .type-btn {
        font-size: 0.8em;
        padding: 10px;
    }
} 