:root {
    --primary-color: #4285F4;
    --background-color: #f4f5f7;
    --card-background: #ffffff;
    --text-color: #333;
    --border-color: #e0e0e0;
    --success-color: #34A853;
    --error-color: #EA4335;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 900px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 2em;
    color: var(--text-color);
}

header h1 img {
    width: 28px;
    height: 28px;
}

.card {
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
}

.upload-card h2, .file-list-card h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

#drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: border-color 0.3s, background-color 0.3s;
}

#drop-area.highlight {
    border-color: var(--primary-color);
    background-color: #f0f6ff;
}

#drop-area p {
    margin: 10px 0 0;
    color: #777;
}

.button, a.button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.button:hover, a.button:hover {
    background-color: #3367D6;
}

.upload-info {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin-top: 15px;
}

.progress-wrapper {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 20px;
    position: relative;
    height: 25px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--success-color);
    border-radius: 5px;
    transition: width 0.4s ease;
}

#progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

#upload-status {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}
#upload-status.success { color: var(--success-color); }
#upload-status.error { color: var(--error-color); }

.search-wrapper {
    margin-bottom: 20px;
}

#searchInput {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #fafafa;
    font-weight: 500;
}

tbody tr:hover {
    background-color: #f9f9f9;
}

td .button {
    padding: 6px 12px;
    font-size: 0.9em;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination button {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
}
.pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.pagination button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.notice {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.notice-warning {
    background-color: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
}
.setup-card {
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
}
.setup-card .button-primary {
    padding: 15px 30px;
    font-size: 1.2em;
}
.sort-controls {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 640px) {
  .search-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  #searchInput { flex: 1; }
  .sort-controls { margin-top: 0; }
}
