* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    font-size: 14px;
    color: #1a202c;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 35px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ffffff, #e5e5e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.header h1 .sub-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-left: 8px;
    vertical-align: middle;
}

.layout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.layout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.main-content {
    padding: 24px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.date-controls {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.date-info h2 {
    color: #1a202c;
    font-size: 1.3rem;
    margin-bottom: 4px;
    font-weight: 700;
}

.date-info p {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.date-buttons {
    display: flex;
    gap: 10px;
}

.date-btn {
    padding: 10px 14px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.3);
}

.date-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.4);
}

.date-btn.today {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.date-btn.today:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.date-btn.calendar-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    min-width: 48px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.date-btn.calendar-btn:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.date-btn.calendar-btn i {
    font-size: 0.9rem;
}

.calendar-picker {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-picker-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-picker-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.calendar-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 14px 4px;
    text-align: center;
    font-weight: 700;
    color: #374151;
    font-size: 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-day-header.sunday {
    color: #ef4444;
}

.calendar-day-header.saturday {
    color: #3b82f6;
}

.calendar-day-cell {
    padding: 10px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.calendar-day-cell:hover {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    transform: scale(1.05);
}

.calendar-day-cell.other-month {
    color: #d1d5db;
}

.calendar-day-cell.today {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.calendar-day-cell.selected {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.3);
}

.calendar-day-cell.sunday {
    color: #ef4444;
}

.calendar-day-cell.saturday {
    color: #3b82f6;
}

.calendar-day-cell.sunday.other-month,
.calendar-day-cell.saturday.other-month {
    color: #d1d5db;
}

.calendar-footer {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.calendar-footer button {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-footer .btn-today {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.calendar-footer .btn-today:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.calendar-footer .btn-cancel {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.calendar-footer .btn-cancel:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.schedule-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    height: 780px;
    display: flex;
    flex-direction: column;
}

.schedule-wrapper {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-table {
    display: table;
    width: 100%;
    min-width: 560px;
}

.schedule-header {
    display: table-row;
    position: sticky;
    top: 0;
    z-index: 50;
}

.schedule-header-cell {
    display: table-cell;
    padding: 18px 8px;
    text-align: center;
    font-weight: 700;
    color: #1a202c;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 0.9rem;
    vertical-align: middle;
}

.schedule-header-cell:first-child {
    width: 80px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    position: sticky;
    left: 0;
    z-index: 60;
}

.schedule-header-cell:not(:first-child) {
    width: 120px;
}

.schedule-header-cell:last-child {
    border-right: none;
}

.schedule-body {
    display: table-row-group;
}

.schedule-row {
    display: table-row;
}

.time-cell {
    display: table-cell;
    width: 80px;
    padding: 14px 8px;
    text-align: center;
    font-weight: 600;
    color: #374151;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 0.9rem;
    position: sticky;
    left: 0;
    z-index: 40;
    height: 50px;
}

.space-cell {
    display: table-cell;
    width: 120px;
    padding: 4px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 50px;
    vertical-align: middle;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
}

.space-cell:last-child {
    border-right: none;
}

.space-cell:hover {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    transform: scale(1.02);
}

.reservation-block {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 10;
    min-height: 18px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reservation-block:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.reservation-room {
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 1px;
}

.reservation-time {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 0;
    padding: 0;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: absolute;
    bottom: 0;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 24px 20px;
    border-radius: 24px 24px 0 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(26, 26, 26, 0.3);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 24px 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a202c;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.time-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.btn-cancel {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* スクロールバーのスタイリング */
.schedule-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.schedule-wrapper::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 4px;
}

.schedule-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.schedule-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
        border-radius: 0;
    }

    .header {
        border-radius: 0;
    }

    .modal-content {
        margin: 10% auto;
        width: 90%;
        max-width: 500px;
        border-radius: 24px;
        position: relative;
        bottom: auto;
        animation: none;
    }

    .modal-header {
        border-radius: 24px 24px 0 0;
    }

    .time-column {
        width: 100px;
    }

    .time-cell {
        width: 100px;
    }

    .space-cell {
        width: 150px;
    }

    .spaces-content {
        min-width: 600px; /* 4列 × 150px = 600px */
    }

    .calendar-column {
        width: 150px;
    }
} 