:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5a623;
    --success-color: #28a745;
    --error-color: #dc3545;
    --background-color: #f0f4f8;
    --form-background: #ffffff;
    --text-color: #333333;
    --border-radius: 8px;
    --transition-speed: 0.3s;

    /* 領域ごとの背景色 */
    --ryoiki-ms-bg: #f0f7ff; /* 青みがかった背景 */
    --ryoiki-ch-bg: #fff0f7; /* ピンクがかった背景 */
    --ryoiki-default-bg: #f0f4f8;

    /* 領域ごとのタイトル色 */
    --ryoiki-ms-title: #2c5282; /* 濃い青 */
    --ryoiki-ch-title: #822727; /* 濃い赤 */
    --ryoiki-default-title: #4a90e2;
}

body, html {
    height: 100%;
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

body {
    max-width: 600px;
    padding: 20px;
    line-height: 1.6;
}

/* 領域ごとのスタイル */
body.ryoiki-ms {
    background-color: var(--ryoiki-ms-bg);
}

body.ryoiki-ch {
    background-color: var(--ryoiki-ch-bg);
}

body.ryoiki-ms h1 {
    color: var(--ryoiki-ms-title);
}

body.ryoiki-ch h1 {
    color: var(--ryoiki-ch-title);
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 300;
    font-size: 24px;
}

form {
    background: var(--form-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow var(--transition-speed);
}

form:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

label {
    display: block;
    margin-top: 20px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9em;
}

input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color var(--transition-speed);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: background-color var(--transition-speed), opacity var(--transition-speed);
}

button:hover:not(:disabled) {
    background-color: #3a7bc8;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-container {
    background: white;
    border-radius: 8px;
    padding: 40px;
    width: 320px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.error-message {
    color: var(--error-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.microsoft-button {
    background-color: #0078d4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.microsoft-button:hover {
    background-color: #106ebe;
}

.microsoft-logo {
    width: 20px;
    height: 20px;
}


#file-list {
    margin-top: 20px;
}

.file-item {
    background: #eee;
    padding: 10px;
    margin: 10px 0;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info {
    display: flex;
    align-items: center;
}

.file-info::before {
    content: '📁';
    margin-right: 10px;
    font-size: 1.2em;
}

.delete-file {
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.delete-file:hover {
    background-color: #c82333;
}

.success {
    background-color: var(--success-color);
    color: white;
}

.error {
    background-color: var(--error-color);
    color: white;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.file-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.move-file {
    padding: 2px 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.move-file:hover {
    background: #e0e0e0;
}
